> Adding an automatic versioning would defeat caching all the time, which would likely cause excessive server loads.
Am I misunderstanding something about how browser caches work with url parameters?
If a user sets a new crop focus for foo.jpg, I believe you could store the current timestamp and present the image with that timestamp as a URL parameter, such as /uploads/foo.jpg?ts=1574267133
Subsequent requests for /uploads/foo.jpg?ts=1574267133 would still be served from the browser cache, no? If someone sets a new focus, save the new timestamp, present the image with that, and it’ll force a new GET.
@veerap:
Your use case is your own, of course, but I’m curious what kind of website(s) you have that this is a problem. I could definitely see you running into the issue while doing some development, but in the “real world”, won’t an Author upload a new image and set the crop more or less right away, before anyone’s browsers even cache it?
You could also take a look at how long you’re telling browsers to cache images for. I know all the “Page Speed” tools recommend super long times (like a month or longer), but it’s totally reasonable to limit these to 24 hours or something and you’ll still a lot of the cache benefits.