skip to Main Content

I have a fresh Drupal 10 installation and I am trying to create a new image style, whenever I edit an image style (new or a default Drupal one) I get this error:

DivisionByZeroError: Division by zero in template_preprocess_image_style_preview() (line 77 of core/modules/image/image.admin.inc).

Adding some logging to core/modules/image/image.admin.inc reveals there is no "derivative" key on $variables['preview'].

I am using PHP8.2 and NGINX on Ubuntu 22 Windows Subsystem for Linux.

2

Answers


  1. Chosen as BEST ANSWER

    I have stopped using WSL as it seemed to be the cause of the issue, it works without any problems using WAMP or NGINX on an Ubuntu VM.


  2. Defining the private file path and giving the private file directory 755 permissions resolved the same error message for me on a Drupal.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search