0

I've got a weird thing going where image styles are not being generated after uploading images (as media entities)

Image styles are generated during a cron run.

Is there a setting for this that I have unintentionally enabled somewhere? What else could be causing this?

  • I could be wrong but aren't they generated when they're requested if they don't exist? So if you have breakpoints you have to visit the page under certain conditions to trigger a particular image style. – prkos Jun 21 at 14:13
  • What @prkos said. Image styles aren’t generated immediately or on cron runs (at least not explicitly unless you’ve got a module of some sort doing it). They’re generated when a non-existent style file is first requested – Clive Jun 21 at 15:01
  • 2
    To expand on Clive's comment.. they are created on demand by design because not every image needs every style. Sites can have many image styles and 1000s of images. Each style is actual a separate image file. Creating all image style files for all images would probably triple (at a min.) the storage requirements. – CG Monroe Jun 21 at 15:20
  • Thank you and yes I understand this aspect of image style generation. But what I am seeing is images that should have been generated are instead being substituted with a default thumbnail. And it is only after running cron that the image style gets generated. I have built over 70 Drupal websites and have never seen this. – MrPaulDriver Jun 22 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.