Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom cache set for Images uploaded #502

Open
MCNorthwood opened this issue Feb 5, 2019 · 5 comments
Open

Custom cache set for Images uploaded #502

MCNorthwood opened this issue Feb 5, 2019 · 5 comments

Comments

@MCNorthwood
Copy link

Hi would it be possible to have a config setting similar to the page/post to be able to set the CacheControl a max-age for the images uploaded to blob storage?

The recommended amount of seconds set for static images should be 1 year (31536000 seconds)

Thanks

@tidyui
Copy link
Member

tidyui commented Feb 5, 2019

Yes we could add this feature, however there’s no guarantee that uploaded files are THAT static as you can update the assets. With that kind of cache date you would need to disable media update and instead always upload new files.

As I see it the recommendation is for static assets not accessible for the editors such as logo, font files, stylesheets and so on. However it could be nice to actually mark a media asset as static, this would treat it in a special way and maybe set a longer expiration date on it.

Regards

@andi0b
Copy link

andi0b commented Nov 23, 2021

This feature is still missing, and it seems like Google is penalizing this behaviour.

The problem of updates is usually solved like this: You add a version number to the image /images/location/image_800.jpg?v=11 and if you change the image again, the version number increases. So for the browser this is a new image then, and it gets downloaded again.

@tidyui
Copy link
Member

tidyui commented Nov 23, 2021

This issue hasn’t been prioritized as you should be able to override the max-age of blob items by using azure cdn in front of it, but we’ll look into it!

@tidyui
Copy link
Member

tidyui commented Nov 23, 2021

As for versioning images we don’t store versions for media items, but the last modification date could be used the generate a unique hash.

@tidyui tidyui added this to the Version 11.0 milestone Nov 23, 2021
@tidyui tidyui added the core label Nov 23, 2021
@tidyui tidyui moved this to To do in Version 11.0 Mar 31, 2023
@vitali-karmanov
Copy link
Contributor

I'm excited that this feature is being added to version 11. Looking forward to it, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants