gdscott
Forum Replies Created
-
With a bit more searching, I have found the offending elements – it was the sticky add-to-cart and sticky product pagination elements from the storefront theme.
They are not compatible with the rules in your lazy load implementation.
In the src for the images used by the two sticky elements the lazy load code is adding the src field as
“image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7”
but it should be
“data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7”
this is leading the browser/server to a append “https://domain.com/product/” in front to create the url
https://domain.com/product/image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7″
This is then being redirected due to the three “///” in the middle which is then a 404 because the URL does not exist.I wanted to let you know in case any one else is having problems /it’s useful in the future/ you can add features to your lazy load src replacement rules that could prevent this from happening.
Thanks for your help.
I’ve looked at the network processes and it looks like the placeholder is successfully loading from
“data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7”When lazy load for product images is turned on it is then trying to load the url
https://domain.com/product/image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7This URL is then 301>401. Do you know why it is creating this URL that doesn’t exist?
Thanks for all of your help.
Hi Hristo,
Thanks for your advice.
I’ve tried turning off the minification/combination for css, html, and js then purged the cache (no CDN)… and I’m still getting the 301>401 for the image placeholder.
The problem is also only happening on product pages with WooCommerce.
Cheers