compatibility with media responsive thumbnail / webp modules

Created on 22 May 2023, about 1 year ago
Updated 18 April 2024, 2 months ago

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.

πŸ› Bug report
Status

Active

Version

2.0

Component

Media Integration

Created by

πŸ‡§πŸ‡ͺBelgium OCTOGONE.dev Brussels

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

Comments & Activities

  • Issue created by @OCTOGONE.dev
  • πŸ‡§πŸ‡ͺBelgium OCTOGONE.dev Brussels

    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>
  • πŸ‡§πŸ‡ͺBelgium OCTOGONE.dev Brussels
  • πŸ‡ΊπŸ‡¦Ukraine Belialius Cherkasy

    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

  • πŸ‡¨πŸ‡¦Canada dalin Guelph, πŸ‡¨πŸ‡¦, 🌍

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

  • 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

  • Try this https://www.drupal.org/project/crop/issues/3293782 πŸ› Crop API is not appending a hash when the image styles are converted to WEBP RTBC it solved my issues

  • πŸ‡¬πŸ‡§United Kingdom rossb89

    Yup, patch in https://www.drupal.org/project/crop/issues/3293782 πŸ› Crop API is not appending a hash when the image styles are converted to WEBP RTBC is the one for webp.

Production build 0.69.0 2024