Drupal 8/9 not generate image style

Today's problem - in the process of developing the site, image styles have ceased to be generated, and even in the admin theme. In order to find the reason and still leave the site with normal images, it was necessary to enable style generation at all costs.

On drupal.org I found a solution in the form of command execution

sudo a2enmod rewrite
systemctl restart apache2

But my server is running on centos with brainycp and this command cannot be executed. In other topics, I found another solution - in the styles folder, create an htaccess file and content

<Files *>
  SetHandler none

But this option was not successful either.

Finally, the following option helped - in the settings file, add the lines

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

After that, all styles should load as expected.

And as a small recap - it looks like the issues with image streaming were caused by enabling accelerations and caching in the cloudflare settings of the brainy control panel.

At least after disabling this whole thing and commenting out the lines above, all styles began to work as they should.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
The comment language code.