s3_website icon indicating copy to clipboard operation
s3_website copied to clipboard

Caching images

Open agjs opened this issue 8 years ago • 4 comments

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 avatar Jun 12 '17 10:06 agjs

Anyone ?

agjs avatar Jun 12 '17 20:06 agjs

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

pathawks avatar Jun 12 '17 23:06 pathawks

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.

  • Public
  • Assets
  • Images
  • Bunch of sub folders

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

agjs avatar Jun 13 '17 08:06 agjs

bump

agjs avatar Jun 13 '17 20:06 agjs