performance icon indicating copy to clipboard operation
performance copied to clipboard

Site Health tests for images should be moved to the Modern Image Formats plugin

Open westonruter opened this issue 1 year ago • 6 comments

Feature Description

There are five Site Health tests currently:

  1. audit-autoloaded-options
  2. audit-enqueued-assets
  3. avif-headers
  4. avif-support
  5. webp-support

The first two would remain in Performance Lab since they aren't related to any other plugins. But the last three would make sense to move to the Modern Image Formats plugin at some point. Otherwise, someone could install the Modern Image Formats plugin alone without Performance Lab and then miss out on those Site Health tests which would be dependencies for the plugin working properly.

Previously discussed at https://github.com/WordPress/performance/issues/1731#issuecomment-2552300273

westonruter avatar Jan 07 '25 18:01 westonruter

For background, part of the logic for keeping all the Site Health checks in the main Performance Lab plugin was so that folks running Performance Lab (which is the larger user base) would get feedback about ways they could improve the performance of their site, including being able to encourage feature plugins from the Performance Team, when applicable.

This also separates health checks that surface things that can be improved, from specific implementations, while allowing the Performance Team plugins to customize those health checks via filters.

I think there is still value in keeping these separate from the plugins that they're related to, personally.

joemcgill avatar Jan 07 '25 20:01 joemcgill

Regarding these tests specifically:

These don't really matter on sites that don't have the Modern Image Formats plugin active, do they?

westonruter avatar Jan 07 '25 20:01 westonruter

That's probably true for avif-headers, but the two health checks for server support of WebP and AVIF are useful regardless of whether you are using our plugins to produce WebP or not.

That said, those two base health checks should probably be in Core already, since both formats are supported in Core today. What do you think?

joemcgill avatar Jan 08 '25 15:01 joemcgill

Yeah, they all three seem relevant for core now actually. Maybe there should be a webp-headers test as well to go alongside avif-headers.

westonruter avatar Jan 08 '25 17:01 westonruter

I’d like to work on this issue. I plan to move the Site Health image-format tests (webp-support and avif-support) from Performance Lab to the Modern Image Formats plugin.

krishnachandak-2004 avatar Jul 19 '25 19:07 krishnachandak-2004

I’d like to work on this issue. I plan to move the Site Health image-format tests (webp-support and avif-support) from Performance Lab to the Modern Image Formats plugin.

@krishnachandak-2004 based on the discussion above, it makes more sense to open and work on a WordPress core Trac ticket to add these tests to core instead of moving them to modern image formats. Do you want to work on that?

adamsilverstein avatar Jul 20 '25 15:07 adamsilverstein