Last week Performance team contributors were working on refining their follow-up patches for the multi-mime/WebP feature, after the main work for it was merged into core for 6.1 at the end of July. This includes smaller related items like the shim for non-supporting browsers and adding PDF support, which are being handled in separate tickets.
The proposal to generate WebP images by default for new JPEG image uploads has been controversial from the beginning. While the Google-sponsored contributors driving the project have made some revisions after an initial round of significant critical feedback, other contributors have continued to voice concerns that they said were not being considered. Several contributors reported issues with the feature and suggested that it should start by being opt-in, an idea that was summarily dismissed before the main work was committed.
Last week, WordPress lead developer Andrew Ozz weighed in on the ticket with new objections:
Like @MatthiasReinholz, @eatingrules, and others I think this approach is perhaps lacking. Why would there be twice as many image files taking up a lot of extra space when half of them will never ever be used anywhere?
IMHO a better approach would be to just make all image sub-sizes WEBP. If JPEGs are indeed needed, these can be generated on-the-fly as needed. There is no point of clogging the web servers storage with all these useless files.
On the other hand, if the WEBP file sizes are actually larger than the JPEGs, that would probably mean that better tools are needed, and this patch is premature.
Six weeks ago, in response to one complaint that the “resources for conversion would be tremendous,” Google-sponsored core committer Adam Silverstein confirmed that resources for generating the images on upload would “increase dramatically.”
“However resources to serve an image will be lowered,” Silverstein said. “Since image uploading is very rare compared to image serving, the extra effort to compress and store images should be worth it.”
This is another problem Ozz cited in his objection to this approach.
“Actually that dramatic increase of resources usage when uploading an image is a very bad side effect here,” Ozz said. “It means a lot of uploads will fail, and leave the users stranded. It also will increase support requests for both WordPress and the hosting companies dramatically. Don’t think this is acceptable. Because of this, even if image multi-mime support is needed in WordPress, the current approach doesn’t seem like a good solution.”
Approximately 24 hours later, Google-sponsored contributor Felix Arntz commented to advise that the WebP fallback mechanism to JPEG for older browsers was ready for commit and that he planned to commit it in a few days.
“Please do not commit any more code here unless it is to address the dramatic increase of resources needed to create image sub-sizes after upload,” Ozz said. “As
[…]
This article was written by Sarah Gooding and originally published on WP Tavern.