Created on 17 March 2024, about 1 year ago
Updated 3 July 2024, 9 months ago

Hello,

Is it possible to use like this way? But I tested it and it didn't work.

<img src="{{ '/sites/default/files/img/111.png'|towebp }}" />
<br>
<img src="{{ '/sites/default/files/img/111.png'|file_url|towebp }}" />
<br>
<img src="{{ drupal_token('node:field_image:entity:url')|towebp }}" />
<br>
<img src="{{ drupal_token('node:field_image:entity:url')|file_url|towebp }}" />
<br>
<img src="{{ drupal_url('/sites/default/files/img/111.png')|towebp }}" />
<br>
<img src="{{ drupal_url('/sites/default/files/img/111.png')|file_url|towebp }}" />
<br>

Thank you

💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @msn5158
  • 🇮🇳India gaurav.goyal

    Hi msn5158,

    Can you please provide some more information on how to reproduce this bug and version of Drupal that you're facing this issue. Basically you should be able to use `towebp` for any image URL. It just need to make sure that the image exists in filesystem.

Production build 0.71.5 2024