Image URL replacement on AMP page not correct
-
Hi team,
I’m the developer from LiteSpeed Cache, we found that AMP plugin is not using
wp_get_attachment_image_src()
orwp_get_attachment_url()
to attache the image url to AMP page.This lead to a bug that when a user enables an URL replacement function for CDN will not return the correct size of the image.
e.g.
Original: https://example.com/image_723x394.png After URL replacement: https://cdn.example.com/image.png
We found this part of function causing this error (url not equal to upload_url after CDN replace)
// Check if $img_url is local. if ( false === strpos( $url, $upload_url ) ) { // Return the original array return array ( 0 => $url, 1 => $width, 2 => $height ); //throw new Aq_Exception('Image must be local: ' . $url); }
Any solution to this bug?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Image URL replacement on AMP page not correct’ is closed to new replies.