Hi, I like me suggest support for webP, Opera, Android, Chrome and Yandex (and browsers based in Chorme) support webP and the last beta version of Firefox support webP too.
Thanks
Read-only archive : Issues · ClassicPress/ClassicPress · GitHub
Author : Anonymous
Vote count : 16
Status : open
Comments
To support this properly, we’ll need to modify how images in content work. The existence of modern media formats with fallbacks proves that it’s important that external resources not be embedded in static and fragile ways.
Perhaps image tags in content could be replaced by an image shortcode, which renders based on image ID and a set of attributes. That way, on render the image would get pulled in with wp_get_attachment_image(), allowing various plugins to filter the output, based on context.
This would also serve to allow other plugins to modify the output, making blur-in lazy-loading (as seen on Medium) and other image enhancements significantly easier.
~ posted by Greg Schoppe
Heh … Using a shortcode for this is quite similar to what I’ve been doing for a while - but both with images AND links; because as soon as URLs change, all goes “boom”. That eg. happens when moving content from one system to another, ie. from the development to the live system. Thus, [permalink]
and [attachment]
shortcodes …
… the nice side effect of corpse is indeed being able to extend the image insertion, eg. for adaptive images instead of the ugly srcset + sizes orgy, and so on.
Thus I’m all in for a “native” CP shortcode / embed shortcode for WebP and the likes
cu, w0lf.
~ posted by Fabian Wolf
I agree that links and self-hosted embedded content are also ripe for a shortcode-like overhaul.
I like this solution because we could easily release a plugin that would add support for these shortcodes to older versions of CP/WP, and since they are using an existing technology, it would be a very low-impact retrofit.
The most complicated bit would be making the interface look good, using something like the existing gallery interface to hide the shortcode and show a pretty visual representation of the image/link/embed.
~ posted by Greg Schoppe
That tutorial shows how to get webp stored in your media library, but it doesn’t touch on image manipulation, thumbnail generation, creating fallback pngs, and generating the code to output webp.
All these things are definitely doable (webp support in GD is apparently really good… Imagick, not so much), but will take a lot more code than is shown there.
~ posted by Greg Schoppe
There is a PR to backport the webp support from WP.
ClassicPress:develop
← mattyrob:fix/webp
opened 04:01PM - 01 Aug 21 UTC
## Description
This is a back-port of multiple upstream changes that add suppor… t for the WebP image format.
## Motivation and context
WebP is now supported by modern browsers and ClassicPress should allow users to upload such images.
## How has this been tested?
Unit tests are included as part of the back ported changes.
## Screenshots
N/A
## Types of changes
- New feature
The WP team is working on finding the best parameters for optimizing images and how to handle conversion of existing images.
The idea given here of a shortcode would be a different approach than WP took.
Using a shortcode would impact searches. Also, an image with a caption is put into the content as a [caption]
shortcode. Since currently shortcodes can’t be nested, something would have to be worked out for that.
1 Like
viktor
January 14, 2023, 5:19am
5
This will be included in the re-fork. The petition will be closed.