Avatar cropping and browser/CDN caching

  • When cropping an avatar the new version doesn't always show instantly due to browser or CDN caching.


    If cropped avatars were given a new URL then they would auto update without having to CTRL+F5 of flush cache manually.


    This would mean advanced users can use CDN on all images not just static ones, a huge performance saving.

  • That behaviour relays on the web server settings of caching files. You have to change this configuration to get the newest image immediately.

  • I think he wants to add a version prefix to the URL same as for CSS und JS files, so that caching is avoided.

    "A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP" — Leonard Nimoy

  • This issue exists in the gallery also, when cropping thumbs. It would be awesome if you could generate new urls when an avatar or gallery image is cropped :)


    Currently I have disabled all images on my CDN being cached to avoid this, it's a real performance drag not caching such large jpgs :/

  • In case anyone else wants to run CDN cache on images but doesnt want to break cropping updates of thumbnails for gallery and avatars you can white-list these urls: (if CDN supports wildcards!)


    This will leave just the largest version of avatars and gallery images to be cached, the largest versions are not edited when cropping and as the biggest they are using the most resources, kind of a win in this situation.


    Better would be to create new urls in the software when images are cropped.


  • @DealTrakr It will not changed in the current major release, but this is way to early to give definite answers regarding the next major version which is currently in early development. I doubt there will be any changes, though.

    Alexander Ebert
    Senior Developer WoltLab® GmbH