Replaced pictures
When you replace the file of a picture in the media library and keep the same file name, the picture's web address does not change. Image delivery networks tell browsers to keep a picture for up to a year, so a visitor who saw the old picture can keep seeing it long after you replaced it.
SyteOps fixes this for the pictures you replaced, and only for those. A replaced picture gets a short version tag at the end of its web address (a question mark followed by a few letters and digits). A browser that holds the old picture has never seen that address, so it fetches the new one. Every other picture keeps its address, so nothing else is downloaded again.
When a picture counts as replaced
SyteOps watches the picture's ORIGINAL file, the one you uploaded, not the smaller copies it makes. When the original is replaced under the same name through WordPress, for example with a media replace plugin, the picture is marked. A picture that is brand new is never marked, and neither is a picture whose thumbnails were rebuilt, whose large copy was rewritten by an image optimizer, or that was renamed (a new file name is a new web address anyway). A replacement that rewrites only the large copy and leaves the original alone is not detected. A picture needs its note first, see below.
Pictures you uploaded before this feature
SyteOps notices a replacement by comparing the picture's original file with a note it keeps about it (its date, size and name). A picture uploaded before this feature has no such note yet. After an update, SyteOps writes the missing notes in the background, a few hundred pictures at a time, with a short pause between the groups, so the site is never slowed down and a large media library simply takes longer. It only writes notes: it never marks a picture and never clears a cache. Once a picture has its note, replacing it is noticed like any other replacement. A picture that is replaced before the background job has reached it is simply noted as it is then, so that one replacement is not marked on its own and needs a site manager's mark. A picture whose file is missing, or whose files are kept on remote storage, is skipped. Once a picture has its note, a change to only its file date (a restore that drops dates, or a lossless optimizer run on the original) followed by a change to the picture's details marks it too, at most 20 pictures per hour. The progress, including when the job last ran and whether it stopped after repeated failures, is part of the cache state the management interface reports, and a site manager can start the job by hand from the command line or switch it off.
The automatic marks have two limits, so a bulk job can never make a whole site download its pictures again: at most 20 pictures are marked on their own per hour (a site manager can change that number), and when the list of 500 marks is full of marks less than a day old, new automatic marks wait instead of pushing the recent ones out. Marks a site manager asks for are not limited this way.
SyteOps cannot see a file that was copied over the old one by FTP or on the server with nothing else touching the picture. For those, ask your site manager to mark the pictures, using the site's management interface or the command line tool. The list of pictures marked most recently is part of the cache state the management interface reports.
What happens when a picture is marked
- The picture's addresses in pages, in the picture's other sizes and in lazy-loaded images carry the new version tag.
- The pages that show the picture, and the picture's own addresses, are purged from the page caches SyteOps knows about, so the next visitor gets a page with the new address. Pages that mention the picture are found by a search that stops at a limit, so on a very large site a page that was missed shows the new address once its own cache expires.
- If your site uses Easy IO from EWWW Image Optimizer, the tag is added to the Easy IO address. Easy IO has no way to clear a single picture, but the new address makes it fetch the new file.
A mark is kept for 400 days, which is longer than the year a browser keeps a picture, and SyteOps keeps at most 500 marks at a time, dropping the oldest first.
Marked pictures are not listed on a screen and need no setting. A site manager can switch the whole feature off.