1

I have a problem where Drupal tries to access the files in the "styles/stylename" directory, but they are not there since they aren't beeing generated. I allready tried changing the theme for a while (image style (imagecache) images are not being created) and also tried creating the style folder, changing permission and editing the .htacces file (https://www.drupal.org/forum/support/post-installation/2015-06-16/image-styles-not-generating#comment-11859066). I also tried a few other things, nothing seems to work.

Maybe usefull information: the images are created in a directory based on the month and year.
for example "sites/default/files/2019-07/filename.png"

edit: When accessing the url of the image style it returns:

Error: Class 'lsolesen\pel\PelJpeg' not found in Drupal\file_mdm_exif\Plugin\FileMetadata\Exif->getFile() (line 108 of modules/file_mdm/file_mdm_exif/src/Plugin/FileMetadata/Exif.php). Drupal\file_mdm_exif\Plugin\FileMetadata\Exif->getFile() (Line: 127) Drupal\file_mdm_exif\Plugin\FileMetadata\Exif->doGetMetadataFromFile() (Line: 280) Drupal\file_mdm\Plugin\FileMetadata\FileMetadataPluginBase->loadMetadataFromFile() (Line: 377) Drupal\file_mdm\Plugin\FileMetadata\FileMetadataPluginBase->getMetadata('Orientation') (Line: 183) Drupal\file_mdm\FileMetadata->getMetadata('exif', 'Orientation') (Line: 39) Drupal\image_effects\Plugin\ImageToolkit\Operation\gd\AutoOrient->execute(Array) (Line: 172) Drupal\Core\ImageToolkit\ImageToolkitOperationBase->apply(Array) (Line: 124) Drupal\Core\ImageToolkit\ImageToolkitBase->apply('auto_orient', Array) (Line: 143) Drupal\Core\Image\Image->apply('auto_orient') (Line: 138) Drupal\image_effects\Plugin\ImageEffect\AutoOrientImageEffect->applyEffect(Object) (Line: 302) Drupal\image\Entity\ImageStyle->createDerivative('public://2018-05/02_1.jpg', 'public://styles/project_gallery_image/public/2018-05/02_1.jpg') (Line: 161) Drupal\image\Controller\ImageStyleDownloadController->deliver(Object, 'public', Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 582) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 151) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • 1
    Try access url of image style and provide message error. – Jonh Jul 29 at 15:22
  • @Jonh When accessing the url over the browser, it returns: "The website encountered an unexpected error. Please try again later." – Bruhno Jul 29 at 15:34
  • You need to follow topic to show error message. a – Jonh Jul 29 at 15:38
  • 1
    I think you have problem with install image affect. Let using composer. – Jonh Jul 29 at 15:53
1

Try to installed missed library by the following comment on the root of your drupal website :

composer require drupal/image_effects:^2
  • Thanks, I believe this fixxed the main issue. I still have a problem where the image style generator tries to get files uploaded with uppercase extensions, from a lowercase source and throws an error like "Image generation failed. source file missing". But I belive thats a completely different issue. – Bruhno Jul 30 at 7:40
  • @Bruhno you're welcome . please ask it in another question and give more details about that. I'm here to help the other Drupalist – Yusef Jul 30 at 9:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.