Skip to content

Resize filter with responsive option #1469

Answered by ArnaudLigny
matthieu2607 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @matthieu2607, did you try to pipe the resize and the html filter?

For example:

{{ asset('image.jpg')|resize(300)|html({alt: 'Image description'}, {responsive: true}) }}

Note: {responsive: true} is not required if the option is enabled globally through assets configuration.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by matthieu2607
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants