wp-youtube-lyte icon indicating copy to clipboard operation
wp-youtube-lyte copied to clipboard

Save video thumbnails in webP format?

Open ianpegg opened this issue 3 years ago • 4 comments

Hello,

Now that WP supports webP images, would it be possible to save video thumbnails in this format? Or is there already a way to configure the plugin to do this?

Browser support for webP now looks good but the plugin could still generate jpegs too for full compatibility.

ianpegg avatar Feb 03 '22 14:02 ianpegg

it's on my backlog, but I lack the time now. if ever you're interested & have time; the is logic to be added in lyteCache.php, which should if available (based on YT API response) should (also) download the webp version of the thumbnail and then based on accept-headers serve either webp or jpeg version.

futtta avatar Feb 03 '22 14:02 futtta

Thank you, Frank. I completely understand you're busy. I'm in a similar situation right now but I would love to help so will circle back to this and see what I can do when I have some spare time!

ianpegg avatar Mar 07 '22 14:03 ianpegg

@ianpegg I got you fam. Changes to two files enable webp. Enjoy! I could only upload as txt. But they're php files. tested and working. Hopefully futta can diff these changes and add them to the repo. Best plugin ever!

lyteCache.txt

wp-youtube-lyte.txt

theflyingjay avatar Feb 14 '24 22:02 theflyingjay

Smashing! Thanks, @theflyingjay, this has been in my backlog for too long! I'll take a look at your code when I get five...

ianpegg avatar Feb 15 '24 15:02 ianpegg