- First commit to issue fork.
- @duaelfr opened merge request.
- π«π·France duaelfr Montpellier, France
I merged #5 and some cleaned up code from π Review webp filename logic Closed: duplicate into a MR.
I'm closing π Review webp filename logic Closed: duplicate as duplicate, please credit @berliner for their work.
I don't know if this could be shipped in this major release or if it would be considered as a BC breaker. Maintainers will choose. - πͺπΈSpain frouco
The merge request works perfectly for me.
NOTE: Applying the #5 .patch fall into a performance issue. The .webp file is generated on each request due the stored file only has the .webp extension and not both .original.webp
- Status changed to RTBC
about 1 year ago 7:26pm 12 October 2023 - π¬π§United Kingdom scott_euser
Thanks, the merge request changes in https://git.drupalcode.org/project/webp/-/merge_requests/30 solved it for us as well for multiple images with the same name, but different extensions, naming the images like image1.png.webp and image1.jpg.webp keeping them unique.
- π«π·France xavier.masson Haute-Normandie
xavier.masson β made their first commit to this issueβs fork.
- π«π·France xavier.masson Haute-Normandie
xavier.masson β changed the visibility of the branch 3281606-rendering-duplicate-images-and-dont-create-derivative to hidden.
- π«π·France xavier.masson Haute-Normandie
xavier.masson β changed the visibility of the branch 3281606-rendering-duplicate-images-and-dont-create-derivative to active.
- Merge request !33Issue #3281606: Rendering duplicate images when the original images have the... β (Open) created by xavier.masson
- πΊπΈUnited States pookmish
Using the MR33 I got a warning when the image is first uploaded:
Undefined variable $webp_wanted in Drupal\webp\Controller\ImageStyleDownloadController->deliver() (line 192 of modules/contrib/webp/src/Controller/ImageStyleDownloadController.php
I think it would be better to break out the "if" statement just a little. Since I'm faster with patch files at the moment, I've provided one with an interdiff.
- Status changed to Needs review
8 months ago 11:45am 14 April 2024 - π©πͺGermany berliner
The performance concern raised in #10 was about the patch in #5, which only changed the urls inside the srcset without also adapting the logic in ImageStyleDownloadController, so I don't see how that would still be an issue with the current patch.
- First commit to issue fork.
- Status changed to RTBC
5 months ago 6:08pm 23 July 2024 - Status changed to Needs work
5 months ago 8:59pm 23 July 2024 - π§πͺBelgium beerendlauwers
The patch also needs to include a change to the
webp_flush_webp_derivatives
function inwebp.module
, which was introduced by https://www.drupal.org/project/webp/issues/3153137 π Using Image Widget Crop in responsive images does not refresh webp image Fixed .Currently, the derivative webp uri is generated like this:
$derivative_webp_uri = preg_replace('/\.(png|jpg|jpeg)$/i', '.webp', $derivative_uri);
This corresponds to the code
$destination = $this->getWebpDestination($uri, '@directory@filename.webp');
Because this patch changes the above to
$destination = $this->getWebpDestination($uri, '@directory@filename.@extension.webp');
, it also needs to change there.Changing it to this makes it consistent again:
$derivative_webp_uri = \Drupal::service('webp.webp')->getWebpDestination($derivative_uri, '@directory@filename.@extension.webp');
- Status changed to Needs review
2 months ago 9:57pm 8 October 2024 - πΊπΈUnited States pookmish
I've updated the image style derivative flush.