Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.57k stars 794 forks source link

Image Size Analysis: Exclude External Images #34199

Open bobmatyas opened 7 months ago

bobmatyas commented 7 months ago

Impacted plugin

Boost

Quick summary

Image Size Analysis makes recommendations for external images included via widgets, but the user doesn't control over the size of those images.

This results in a number of recommendations that can't be acted on. Additionally, Site Accelerator doesn't resize the images.

Steps to reproduce

  1. Use a widget (Jetpack Display Remote Posts) to import blog posts from a third-party site
  2. Run Image Size Analysis
  3. Observe numerous recommendations for image adjustments that can't be made

A clear and concise description of what you expected to happen.

I would expect that we either exclude external images or indicate that they can't be optimized because they are external images.

I also would have expected Site Accelerator to present these at appropriately sized dimensions

What actually happened

External Images Being Loaded:

Annotation on 2023-11-18 at 09-22-37

Results in Image Size Analysis:

Annotation on 2023-11-18 at 09-24-48

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Self-hosted

Logs or notes

No response

thingalon commented 5 months ago

@pyronaur - I would love your thoughts on this. It seems like a quick thing to fix but I want to double-check that the recommended solution is the right approach here first.

pyronaur commented 5 months ago

We can't really differentiate between external images that can or can't be optimized. We probably can't run any auto-fixers or Jetpack CDN to fix them, but we should still let the user know that they're wrecking the performance.

Off the top of my head - a common situation here might be where the user is using some CDN plugin that hosts the images on a different domain.

Sometimes they might not have control, but sometimes they might. Instead of removing, I think this is a point we have to consider through the design of the dashboard.

bobmatyas commented 5 months ago

Yes, I think handling via better design in the dashboard would be a good fix here. I only considered direct imports from third-party sites, not the CDN use case.