Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I encountered a problem tryng to use this module with the cdn module that is needed to load our pages faster. The cdn can't fetch url and the result is that the images are all missing.
Any suggestion on how to configure ais with cdn support?
Comments
Comment #1
spotzero CreditAttribution: spotzero commentedUnfortunately, you probably can't use AIS with a CND out of the box.
This is because:
No AIS Cookie:
/image-url => returns the image (hosted by the CND).
With AIS Cookie:
/image-url => redirect to /resized-image-url (needs to be hosted by Drupal)
Unless your CND can be configured to be cookie aware, this will be problematic since this module essentially make the url to the image magical (sometimes returning an image, and sometimes redirecting to a more appropriate image, depending on a cookie).
However, you could probably solve this by making all images redirect.
You'd need to update the htaccess rules to do something like the following:
This means all of your adaptive images must go to Drupal (so Drupal can decide whether or not to adapt them), but all of the actual image files will be hosted by the CND.
Comment #2
spotzero CreditAttribution: spotzero commented