Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offloaded Images appears as broken on the page in preview mode #801

Closed
kushh23 opened this issue May 2, 2024 · 2 comments
Closed

Offloaded Images appears as broken on the page in preview mode #801

kushh23 opened this issue May 2, 2024 · 2 comments
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. Priority-Medium Expected resolution time - up to 1 month. released Indicate that an issue has been resolved and released in a particular version of the product.

Comments

@kushh23
Copy link

kushh23 commented May 2, 2024

Description

When we offload images on our site and attempt to preview a post containing these images, it can be noticed that all images appear broken on the preview page. This issue occurs because, during the preview, I think WordPress (or don't know if Optimole) automatically replaces the CDN URLs with the original URLs of the images.

To confirm this behavior, you can check the URLs of images that are not offloaded; you'll observe that their preview URLs are also replaced with the original URLs. Since offloaded images are no longer available at their original location, this URL substitution results in broken images in the preview.

image

Step-by-step reproduction instructions

  1. Add offloaded images on a page/post.
  2. Before publishing the post, check the preview of it.
  3. You will see that images are appearing as broken.

Screenshots, screen recording, code snippet or Help Scout ticket

Ticket - https://secure.helpscout.net/conversation/2586148942/417571

In the Edit mode, images appear correctly -
image

In preview mode, the image appears as broken-
image

After publishing, it looks correct again-
image

Environment info

No response

Is the issue you are reporting a regression

No

@kushh23 kushh23 added the bug This label could be used to identify issues that are caused by a defect in the product. label May 2, 2024
@pirate-bot pirate-bot added the customer report Indicates the request came from a customer. label May 2, 2024
@kushh23
Copy link
Author

kushh23 commented May 2, 2024

I tried to check how this works for other plugins, for jetpack, the CDN URL was not changed, it was same both in edit and preview mode

@selul selul added the Priority-Medium Expected resolution time - up to 1 month. label May 3, 2024
selul added a commit that referenced this issue May 8, 2024
fix: preview images not working with offload enabled [closes #801]
@selul selul closed this as completed in a02a284 May 14, 2024
@pirate-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 3.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. Priority-Medium Expected resolution time - up to 1 month. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

No branches or pull requests

4 participants