- Issue created by @hmdnawaz
I'm using this module with the https://www.drupal.org/project/imageapi_optimize β . Created a pipeline and selected the webp processor.
Enabled the pipeline on the image styles.
But I'm getting the following response on front-end.
<picture>
<source srcset="/sites/default/files/styles/original_ratio_xl/public/2023-05/original.webp?itok=cykD1FzG 1x" media="(min-width: 1200px)" type="image/webp">
<source srcset="/sites/default/files/styles/original_ratio_lg/public/2023-05/original.webp?itok=edKJlYKP 1x" media="(min-width: 992px)" type="image/webp">
<source srcset="/sites/default/files/styles/original_ratio_md/public/2023-05/original.webp?itok=GsmSZUVz 1x" media="(min-width: 768px)" type="image/webp">
<source srcset="/sites/default/files/styles/original_ratio_sm/public/2023-05/original.webp?itok=AVDYFhj3 1x" media="(min-width: 576px)" type="image/webp">
<source srcset="/sites/default/files/styles/original_ratio_xl/public/2023-05/original.jpg?itok=cykD1FzG 1x" media="(min-width: 1200px)" type="image/jpeg">
<source srcset="/sites/default/files/styles/original_ratio_lg/public/2023-05/original.jpg?itok=edKJlYKP 1x" media="(min-width: 992px)" type="image/jpeg">
<source srcset="/sites/default/files/styles/original_ratio_md/public/2023-05/original.jpg?itok=GsmSZUVz 1x" media="(min-width: 768px)" type="image/jpeg">
<source srcset="/sites/default/files/styles/original_ratio_sm/public/2023-05/original.jpg?itok=AVDYFhj3 1x" media="(min-width: 576px)" type="image/jpeg">
<img src="/sites/default/files/styles/original_ratio_zero/public/2023-05/original.jpg?itok=2lw72qSZ" alt="" class="img-fluid">
</picture>
The image tag pointing to the jpg image.
But when I right-click on the image and select open the image in a new tab, I can see this URL opens. sites/default/files/styles/original_ratio_xl/public/2023-05/original.webp?itok=cykD1FzG
I'm not sure whether this is the correct behavior or not.
Install both modules, configure the pipeline, and select the pipeline on the image styles.
If this is not the correct behavior then need to fix it so that the img tag should point to the webp image.
Active
Code