0

I don't know if this is a Drupal CDN module issue. I have been trying to fix this issue for a few days now but I still have no luck. When I upload an image to my Drupal 9.5 I can see it's been uploaded to one location: public:///styles/large/public/banner/10712751_0.jpeg

I also have some image styles for the same image. I do understand the image styles make the images when someone refers to it, but, in my case now even when I try to load the image style images, those images won't get created under the image style directories. For an example the below locations don't have my physical file created there.

public:///styles/landing_page_banner_desktop/public/banner/10712751_0.jpeg public:///styles/landing_page_banner_tablet/public/banner/10712751_0.jpeg public:///styles/landing_page_banner_mobile/public/banner/10712751_0.jpeg

So as a result, I don't see my image URL path has the /cdn/ff URL string because the below condition fails since file_exists($absolute_file_path) returns false always since the file is not available.

// When farfuture is enabled, rewrite the file URL to let Drupal serve the
// file with optimal headers. Only possible if the file exists.
if ($this->settings->farfutureIsEnabled() && file_exists($absolute_file_path)) {

In other words, I'm expecting my image URLs to be like below:

//assets.company.docksal.site/cdn/ff/Tf5y0t9SVU297c3X_X_YxeMqhvfYFvO3TvLzpBPJzrU/1683669896/public/styles/landing_page_banner_tablet/public/banner/etienne-boulanger-iYcuJQaVTvg.jpg?itok=SJDfT19y

But I endup getting URL like this (Not with the /cdn/ff string)

//assets.company.docksal.site/sites/default/files/styles/landing_page_banner_tablet/public/banner/10712751_0.jpeg?itok=MKyWYIT3

In the files browser(/admin/content/files) in Drupal (see the attached screen), I can see the original image uploaded and has the correct CDN URL. I'm really not sure why it's not able to upload the files for image style images and generate the CDN URL

What could be the reason for this ?. Could you please help me with this ?.

I have setup my file permissions according to this article here

Thanks in advance for looking into this.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.