- πΊπ¦Ukraine HitchShock Ukraine
Reworked the patch to use the file from the media source field instead of the thumbnail.
The ticket still needs tests for a new formatter.
- π§πͺBelgium flyke
Patch from #37 does not seem to apply to 9.5.3.
git apply -v --directory=web responsive-style-for-media-9.5-37.patch Checking patch web/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php... error: while searching for: ], ]; $link_types = [ 'content' => $this->t('Content'), 'file' => $this->t('File'), ]; $elements['image_link'] = [ '#title' => $this->t('Link image to'), '#type' => 'select', '#default_value' => $this->getSetting('image_link'), '#empty_option' => $this->t('Nothing'), '#options' => $link_types, ]; return $elements; error: patch failed: web/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php:148 error: web/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php: patch does not apply Checking patch web/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveMediaImageFormatter.php...
- π©πͺGermany carstenG
Loading attribute is not set with that formatter!
It is missing 2 lines before $elements[$delta] is set:
When I find time I'll provide patch.$image_loading_settings = $this->getSetting('image_loading'); $item_attributes['loading'] = $image_loading_settings['attribute']; $elements[$delta] = [ .....
- First commit to issue fork.
- π§π·Brazil gabriel.passarelli
Here's the #39 patch with the loading attribute that was missing
- πΊπ¦Ukraine deulenko
The #45 patch causes this error
ParseError: Unclosed '{' on line 164 in Composer\Autoload\{closure}() (line 173 of core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveMediaImageFormatter.php).
so I've re-created it.