Closed tsadrafoundation closed 8 months ago
@octfx any tips on which direction should I troubleshoot?
Thank you !
So now I'm able to see the <picture>
element, and the srcset has the 1x, 1.5x and 2x but still no webp:
<picture>
<source srcset="/thumb.php?f=file.jpeg&width=300, /thumb.php?f=file.jpeg&width=450 1.5x, /thumb.php?f=file.jpeg&width=600 2x"><img alt="" src="/thumb.php?f=file.jpeg&width=300" decoding="async" width="300" height="462" class="thumbimage" data-file-width="1331" data-file-height="2048">
</picture>
The webp file is created in the images/webp
path.
I guess now the question is who takes care of that "redirect/rewrite"
Sorry for the very late reply, I’m currently not able to provide any support bugfixes (this will hopefully change in the following weeks)
I see that you are using a thumb handler (thumb.php) I haven’t testet ext:webp using thumb.php so there may be undiscovered issues. :/
You could try deactivating thumb.php and see if this changes things.
@octfx yes, the issue is in using the the thumb handler.
I've commented out $wgThumbnailScriptPath
and it worked.
Thanks!
I have WebP on the develop branch with MW 1.39 & ImageMagik with WebP support.
The WebP images / thumbnails are created but additional srcsets with image/webp MIME type in the
PictureHtmlSupport extension is installed and
/var/www/html/includes/media/ThumbnailImage.php
is being replaced with/var/www/html/extensions/PictureHtmlSupport/includes/ThumbnailImage.php
The webp configutation is
I've noticed that in
./extensions/WebP/includes/Hooks/ThumbnailHooks.php
in the function:the first if the $thumbnail->getStoragePath() is null so it gets out of the function right away and the $srcset array is not populated.