Image styles not generated (except for sample.png when visiting image style management)

Created on 6 April 2021, over 3 years ago
Updated 8 July 2024, 5 months ago

Problem/Motivation

In my local development environment (DDEV), image styles do not generate as expected. Notably, the sample images for image styles do properly generate when visiting their respective management pages, e.g. /admin/config/media/image-styles/manage/thumbnail: they're created in their respective folders, e.g. sites/default/files/styles/thumbnail/public/core/modules/image/sample.png. I've verified that the issue occurs with all images styles, included those newly created for testing.

Steps to reproduce

Disabled all third-party modules (except for those that could not be disabled because of active data, e.g. Paragraphs)
Flush all image styles drush if --all
Visit admin pages that would normally generate the thumbnails, e.g. /admin/content/media

Additional notes

Explicitly defining $settings['file_public_path'] = 'sites/default/files'; does not appear to have any impact on the issue.

πŸ’¬ Support request
Status

Closed: works as designed

Version

8.9 ⚰️

Component
MediaΒ  β†’

Last updated 3 days ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States wmfinck

    This issue just drove me nuts for two weeks. Everything on two different websites, same server, is identical. Same themes, modules, apache configurations, and everything else, just different content. On the second website, no matter what I did the site would not display images in configured image styles, even using the Image Styles Generator module at https://www.drupal.org/project/image_styles_generator β†’ . I went through every setting on each site, and they were all the same in every section. The content types were the same also (both imported from D7).

    So in exasperation I added the $config line in #7 above, $config['image.settings']['allow_insecure_derivatives'] = TRUE;

    Doing that, I cleared the cache, and the image styles began appearing on the site instantly. Thanks for that, but this will remain an enigma to me.

  • πŸ‡ΊπŸ‡ΈUnited States pearl.liang

    $config['image.settings']['allow_insecure_derivatives'] = TRUE;

    The above line solves my issue, too. I am using Drupal 10.3.1

    Thanks c. s. comfort and wmfinck.

Production build 0.71.5 2024