Codeinwp / optimole-wp

30 stars 8 forks source link

fix: preview images not working with offload enabled [closes #801] #803

Closed abaicus closed 4 months ago

abaicus commented 4 months ago

Fixes preview mode not replacing Offloaded URLs.

Closes #801

pirate-bot commented 4 months ago

Plugin build for a02a284dfba0f2b85ab7bc63ac8c5fff188edbd9 is ready :bellhop_bell:!

kushh23 commented 4 months ago

Hey @abaicus,

I was checking the fix of this PR on my test site and found that the issue with preview images being broken is fixed, but a new issue seems to appear on my instance.

If I am using an offloaded image on my instance, then the image URL that is replaced on the page is not an offloaded version of the image.

For example see here - this image is offloaded on my site and I have used this same image on a page- image

But when I preview it, the URL has a wp-content/uploads/ structure image

The image has been offloaded properly as the original URL of image redirects back to homepage i.e 404 not found. But the image URL still contains the old wp-content URL

See the screencast here for a better understanding - https://vertis.d.pr/v/On8bzO

kushh23 commented 4 months ago

Here is the page in question - https://arrogantcap.s3-tastewp.com/offloading-test/

and credentials

https://arrogantcap.s3-tastewp.com/wp-admin/
username: kushnamdev
password: do8RmkmWchw
abaicus commented 4 months ago

This is not related to this particular PR but probably happens due to some other changes on the development branch.

pirate-bot commented 4 months ago

:tada: This PR is included in version 3.13.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: