Skip to content

Image Compare Block: full image URLs are saved in post content, with CDN URL if used #39295

@jeherve

Description

@jeherve

Impacted plugin

Jetpack

Quick summary

When using the Image Compare Block, the full image URL is saved in the post content. It's problematic when using an image CDN like Photon. If that CDN is then deactivated or its URL changes, the images in the post content will continue to use the old CDN URL

Steps to reproduce

  1. Start with a site using the Jetpack plugin, connected to WordPress.com.
  2. Go to Jetpack > Settings > Performance, and activate the Site Accelerator feature.
  3. Go to Posts > Add New
  4. Add an Image Compare Block
  5. Upload 2 images, and publish your post.
  6. Visit the post on the frontend, and open your browser's dev tools.
  7. The images use the CDN URL.
  8. Edit the post, and switch to the code editor view.
  9. You'll see that the images stored in the post content are the full image URLs, with the i0.wp.com prefix.
  10. Now go to Jetpack > Settings > Performance again, and deactivate the Site Accelerator feature.
  11. Go back to the post.

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

I would expect the post to not use the CDN URL anymore.

What actually happened

Instead, it still uses the image CDN since the full image was stored in the post content.

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

Atomic, Self-hosted

Logs or notes

Reported here:
https://wordpress.org/support/topic/bug-in-image-compare-block/

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugWhen a feature is broken and / or not performing as intendedTriaged[Block] Image Compare[Feature] Photonaka "Image CDN". Feature developed in the Image CDN package and shipped in multiple plugins[Platform] Atomic[Plugin] JetpackIssues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/[Pri] Low[Status] Stale

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions