You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you should reconsider adding WebP support. The original ticket proposing WebP support was closed for the reason that, at the time, WordPress core didn’t allow WebP by default, and only one browser understood the format. However, the situation has completely changed since. See:
And actually, updating the "wp-featherlight" plugin to support WebP would be a child’s game. For my own site, I just replaced all occurrences of "bmp" with "webp" in the plugin’s code, and it worked!
The text was updated successfully, but these errors were encountered:
Just update "wpFeatherlight.js" and add "WebP" to the list of image types.
This function is in several places:
/**
* Checks href targets to see if a given anchor is linking to an image.
*
* @since 0.1.0
* @return mixed
*/
function testImages( index, element ) {
return /(.png|.jpg|.jpeg|.gif|.tiff|.bmp|.webp)$/.test(
$( element ).attr( 'href' ).toLowerCase().split( '?' )[0].split( '#' )[0]
);
}
Present in 3 files
js/wpFeatherlight.js
function testImages( index, element ) {
assets/plugin/js/wpFeatherlight.js
function testImages( index, element ) {
js/wpFeatherlight.pkgd.js
function testImages( index, element ) {
Hello,
I think you should reconsider adding WebP support. The original ticket proposing WebP support was closed for the reason that, at the time, WordPress core didn’t allow WebP by default, and only one browser understood the format. However, the situation has completely changed since. See:
https://make.wordpress.org/core/2021/06/07/wordpress-5-8-adds-webp-support/
And actually, updating the "wp-featherlight" plugin to support WebP would be a child’s game. For my own site, I just replaced all occurrences of "bmp" with "webp" in the plugin’s code, and it worked!
The text was updated successfully, but these errors were encountered: