We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass attributes to pimcore_image() or image.thumbnail('size').html({}) in twig as described in https://pimcore.com/docs/pimcore/master/Development_Documentation/Documents/Editables/Image.html#page_An-Example-Using-Custom-Attributes.
pimcore_image()
image.thumbnail('size').html({})
Passed attributes are not present in the html output.
Create an image editable with attributes:
{{ pimcore_image('image', { thumbnail: image_size, attributes: { 'custom-attr': 'value', 'data-role': 'image', } }) }}
Or directly output the image thumbnail:
{{ image.thumbnail(image_size).html({ 'class': 'my-class', 'data-test': '123', }) }}
Version: dev-master|1ba3830f59c407400f99aa21d3cb56db816775da
The text was updated successfully, but these errors were encountered:
@valentin- you should pass imgAttributes or pictureAttributes to thumbnail html() please see https://pimcore.com/docs/pimcore/master/Development_Documentation/Assets/Working_with_Thumbnails/Image_Thumbnails.html#page_Advanced-Examples
imgAttributes
pictureAttributes
anyway example should be removed from the docs. thanks!
Sorry, something went wrong.
031933f
[Docs] Remove invalid example & add title config - follow up to pimco…
d3cddbc
…re#7661 - resolves pimcore#8600
No branches or pull requests
Bug Report
Expected behavior
Pass attributes to
pimcore_image()
orimage.thumbnail('size').html({})
in twig as described in https://pimcore.com/docs/pimcore/master/Development_Documentation/Documents/Editables/Image.html#page_An-Example-Using-Custom-Attributes.Actual behavior
Passed attributes are not present in the html output.
Steps to reproduce
Create an image editable with attributes:
Or directly output the image thumbnail:
Version: dev-master|1ba3830f59c407400f99aa21d3cb56db816775da
The text was updated successfully, but these errors were encountered: