- 🇩🇪Germany Philipp jor
I have the Same Problem in Drupal 8.9.1 after updating from Drupal 8.7
Did you find a way to solve the problem?
I get this error-message by using a form with the cropping-funktion:
The file "public://filename.jpg" is not valid on element field_imagename[0][image_crop].
- 🇨🇦Canada Nathan Tsai
For some reason, I'm also getting this issue.
The cropping is not being applied for the image styles, even after flushing the caches.
I found a workaround. The problem is that the crop module adds unnecessary "&" characters to the URL of a cropped image, this can be corrected using a TWIG replace filter eg:
<img src="{{ image_filename|replace({'&' : '&'}) }}">
Just be careful that the filenames don't contain the "&" character!