laurilehmijoki / s3_website

Manage an S3 website: sync, deliver via CloudFront, benefit from advanced S3 website features.
Other
2.24k stars 187 forks source link

Caching images #278

Open agjs opened 7 years ago

agjs commented 7 years ago

Hi there,

I seam to have an issue caching images with Cloudfront and I'm almost certain it's related to directory structure.

Our images are located under /assets/images/SubFolderOfSpecificPage. When I'm specifying a confirmation s3_website.yml, am I suppose to provide all urls of all subfolders ?

Can I do something like this /assets/images/*/ ?

Thanks in advance

agjs commented 7 years ago

Anyone ?

pathawks commented 7 years ago

Can you be a lot more specific about the problem you are having, and maybe share the relevant portions of your config?

agjs commented 7 years ago

Hi there,

My configuration is pretty much copy/pasted from the default configuration.

Nevertheless, will share it here in a gist file.

https://gist.github.com/agjs/0e4452f17d744f68837169ce3702ebd6

Problem is that no images except .svg are getting Cache-Control header set, therefor, they are not being cached and Google speed insights are giving me a problem on that.

As you can see in my configuration, public folder is what I'm pushing to AWS and inside of that folder there is "assets" which then has images folder inside and images folder has sub-folders of various images.

So I wonder if my configuration file is pointing to those files properly or something else is an issue.

agjs commented 7 years ago

bump