webp
3 years 4 months ago #61107
by vijit555
Right now plugin cannot correctly process webp images and it displays them as iframe, I tried to modify assetts/mediaboxck.js lines 781
if (URL.match(/\.webp|\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i) || mediaType == 'image') {
and 1340 - 1341
if ((prevMedia >= 0) && (mediaArray[prevMedia][0].match(/\.webp\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadPrev.src = mediaArray[prevMedia][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
if ((nextMedia >= 0) && (mediaArray[nextMedia][0].match(/\.webp|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadNext.src = mediaArray[nextMedia][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
but still doesn't work.
Since nowadays webp images are basically required for Google vitals, I'd like to ask which lines should I modify to add webp support.
Thank you.
Screenshot below: how plugin loads webp images now
if (URL.match(/\.webp|\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i) || mediaType == 'image') {
and 1340 - 1341
if ((prevMedia >= 0) && (mediaArray[prevMedia][0].match(/\.webp\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadPrev.src = mediaArray[prevMedia][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
if ((nextMedia >= 0) && (mediaArray[nextMedia][0].match(/\.webp|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadNext.src = mediaArray[nextMedia][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
but still doesn't work.
Since nowadays webp images are basically required for Google vitals, I'd like to ask which lines should I modify to add webp support.
Thank you.
Screenshot below: how plugin loads webp images now
Please Log in or Create an account to join the conversation.
3 years 4 months ago #61117
by vijit555
I apologize, seems like my VPN cache was returning an old version of the page, I switched location and now it works, I will test it better and if it doesn't work I'll write back. Thank you indeed for your kind support.
Please Log in or Create an account to join the conversation.
Time to create page: 0.223 seconds