Problem/Motivation

With media, Focal point is not applied in the display of the field with the media_responsive_thumbnail mode.
It s a contrib module that provide that: https://www.drupal.org/project/media_responsive_thumbnail
With media, is does work in the display of the field with the thumbnail mode.
Not shure if i've to signal this here or at their page.

Comments

OCTOGONE.dev created an issue. See original summary.

OCTOGONE.dev’s picture

After digging, It s not related to the media_responsive_thumbnail, but with the webp Module.
focal point is done with the different jpg image style in the responsive image style -- HTML
tag -- but not with the webp image.

<picture>
                  <source srcset="/sites/default/files/styles/landscape_xxl/public/images/media/2023-05/pexels-photo-842711.webp?h=4b4e72c6&amp;itok=ey89HOJo 1x" media="all and (min-width: 1400px)" type="image/webp">
              <source srcset="/sites/default/files/styles/landscape_xxl/public/images/media/2023-05/pexels-photo-842711.webp?h=4b4e72c6&amp;itok=ey89HOJo 1x" media="all and (min-width: 1200px)" type="image/webp">
              <source srcset="/sites/default/files/styles/landscape_xl/public/images/media/2023-05/pexels-photo-842711.webp?h=4b4e72c6&amp;itok=8rfsXFqb 1x" media="all and (min-width: 992px)" type="image/webp">
              <source srcset="/sites/default/files/styles/landscape_lg/public/images/media/2023-05/pexels-photo-842711.webp?h=4b4e72c6&amp;itok=0DSyvClz 1x" media="all and (min-width: 768px)" type="image/webp">
              <source srcset="/sites/default/files/styles/landscape_md/public/images/media/2023-05/pexels-photo-842711.webp?h=4b4e72c6&amp;itok=C34V042b 1x" media="all and (min-width: 576px)" type="image/webp">
              <source srcset="/sites/default/files/styles/landscape_sm/public/images/media/2023-05/pexels-photo-842711.webp?h=4b4e72c6&amp;itok=2p2Njsym 1x" media="all and (min-width: 0px)" type="image/webp">
              <source srcset="/sites/default/files/styles/landscape_xxl/public/images/media/2023-05/pexels-photo-842711.jpeg?h=4b4e72c6&amp;itok=ey89HOJo 1x" media="all and (min-width: 1400px)" type="image/jpeg">
              <source srcset="/sites/default/files/styles/landscape_xxl/public/images/media/2023-05/pexels-photo-842711.jpeg?h=4b4e72c6&amp;itok=ey89HOJo 1x" media="all and (min-width: 1200px)" type="image/jpeg">
              <source srcset="/sites/default/files/styles/landscape_xl/public/images/media/2023-05/pexels-photo-842711.jpeg?h=4b4e72c6&amp;itok=8rfsXFqb 1x" media="all and (min-width: 992px)" type="image/jpeg">
              <source srcset="/sites/default/files/styles/landscape_lg/public/images/media/2023-05/pexels-photo-842711.jpeg?h=4b4e72c6&amp;itok=0DSyvClz 1x" media="all and (min-width: 768px)" type="image/jpeg">
              <source srcset="/sites/default/files/styles/landscape_md/public/images/media/2023-05/pexels-photo-842711.jpeg?h=4b4e72c6&amp;itok=C34V042b 1x" media="all and (min-width: 576px)" type="image/jpeg">
              <source srcset="/sites/default/files/styles/landscape_sm/public/images/media/2023-05/pexels-photo-842711.jpeg?h=4b4e72c6&amp;itok=2p2Njsym 1x" media="all and (min-width: 0px)" type="image/jpeg">
                  
<img src="/sites/default/files/styles/landscape_xxl/public/images/media/2023-05/pexels-photo-842711.jpeg?h=4b4e72c6&amp;itok=ey89HOJo" alt="" typeof="foaf:Image" draggable="false">
  </picture>
OCTOGONE.dev’s picture

Title: media responsive thumbnail » compatibility with media responsive thumbnail / webp modules
Belialius’s picture

Can confirm that have issue using focal point and webp images, when add convert to webp image style that using focal point, webp is not generated for webp image and images displayed without focal point

dalin’s picture

Is this problem when using Core's support for WebP, and/or with the WebP module?
https://www.drupal.org/project/webp

marcus.williams@four.agency’s picture

I'm seeing the same issue and it using the core webp. I looks like crop_field_data isn't populated for any webp images

marcus.williams@four.agency’s picture

rossb89’s picture

Yup, patch in https://www.drupal.org/project/crop/issues/3293782 is the one for webp.