Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have an image style using Focal Point Scale and Crop and Watermark effects. I use the following code
$style_storage = \Drupal::entityTypeManager()->getStorage('image_style');
$styles = $style_storage->loadMultiple($style_list);
if ($style_config = $style->getEffects()->getConfiguration()) {
$style_data = array_values($style_config)[0]['data'];
}
if (empty($style_data['width'])) {
....
}
It works ok, but when I add another focal point scale, move it to the top and delete the previous focal point scale, the $style_data['width'] is empty. Removing the watermark effect and adding it again solves it, the $style_data['width'] is populated again.
Not sure, but it seems like it is a bug.
Comments
Comment #3
pameeela CreditAttribution: pameeela commentedHi @balagan Focal Point Scale and Crop and Watermark effects are not included in core. Does this issue occur in core or should this be moved to the contrib queue?
Comment #4
pameeela CreditAttribution: pameeela commented