mihaic195
Joined 8/27/2020
mihaic195 said over 3 years ago on Active Storage Uploads Behind a CDN :
Doesn't seem to be working for variants... but for regular ActiveStorage it's fine.

mihaic195 said over 3 years ago on Active Storage Uploads Behind a CDN :
  with Variants, the link looks like this:  
variants/rsoao6al0qs6i7ufbzm5x2nw4hr1/cabe6e2a3218e12456787572cfb5ee71459383cdd72e19a0f5bacea3b3987208
which yields a 403 from Cloudfront. 
I have the image_processing gem installed.

mihaic195 said over 3 years ago on Active Storage Uploads Behind a CDN :
Indeed the variants are missing from S3

mihaic195 said over 3 years ago on Active Storage Uploads Behind a CDN :
Based on the Rails Documentation from https://api.rubyonrails.org/classes/ActiveStorage/Variant.html
all I had to do is call processed on the image to create the variant, which is still weird to me. Now the CDN link also works.
Thank you!

<%= image_tag cdn_url(@user.avatar.variant(resize_to_limit: [100, 100]).processed)