Žarko Kuvalja Posted October 14 Share Posted October 14 Hi, This is causing me headaches so I hope someone here might help me out and tell me I'm missing something dumb. Using this: https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fzar.co.com%2Fwaypoint-agency-branding%2F I keep getting the following error: Quote Provided og:image, http://zar.co.com/site/assets/files/1045/waypoint_og_image_optimized.png could not be downloaded. This can happen due to several different reasons such as your server using unsupported content-encoding. The crawler accepts deflate and gzip content encodings. As far as I can tell, the only place where the og:image doesn't work is when trying to share a given link through WhatsApp Sharing via Facebook (share post) works as expected and loads the image. I've tried using https for serving the image, switched now to http because some Stackexchange threads mentioned that as better. I've tried a more optimized .png, I've tried a .jpg. I've enabled gzip on the server (shared hosting, cpanel). I just can't figure out what is the issue here. This is the actual code I'm using to generate the og:image link: <meta property="og:image" content="<?php echo str_replace('https://', 'http://', $page->og_image_field->httpUrl); ?> "/> The site in question - https://zar.co.com Link to comment Share on other sites More sharing options...
bernhard Posted October 14 Share Posted October 14 Are you using ProCache with setting remove quotes if possible? Link to comment Share on other sites More sharing options...
Žarko Kuvalja Posted October 14 Author Share Posted October 14 21 minutes ago, bernhard said: Are you using ProCache with setting remove quotes if possible? I'm not, it's just all regular Processwire. Link to comment Share on other sites More sharing options...
poljpocket Posted October 14 Share Posted October 14 Not that this will solve your problem or have anything to do with it, but I can see a <head> tag inside another <head> tag when looking at your source code. W3C validity check brings some more problems to the surface, especially with your meta tags: https://validator.w3.org/nu/?doc=https%3A%2F%2Fzar.co.com%2F You could try fixing at least everything in <head> and try again. Link to comment Share on other sites More sharing options...
Žarko Kuvalja Posted October 15 Author Share Posted October 15 13 hours ago, poljpocket said: Not that this will solve your problem or have anything to do with it, but I can see a <head> tag inside another <head> tag when looking at your source code. W3C validity check brings some more problems to the surface, especially with your meta tags: https://validator.w3.org/nu/?doc=https%3A%2F%2Fzar.co.com%2F You could try fixing at least everything in <head> and try again. Oh boy. Thanks, I'll comb through this. Link to comment Share on other sites More sharing options...
AndZyk Posted October 15 Share Posted October 15 I can see the image when I enter your URL in WhatsApp. But yes, it would probably be better to validate your HTML and remove the duplicate <head>-tag. Also I would recommend using https for all your links, to avoid mixed content. You also have a unnecessary space at the end of og:image content, but that should be no problem. 😉 Link to comment Share on other sites More sharing options...
Žarko Kuvalja Posted October 15 Author Share Posted October 15 (edited) 4 hours ago, AndZyk said: I can see the image when I enter your URL in WhatsApp. But yes, it would probably be better to validate your HTML and remove the duplicate <head>-tag. Also I would recommend using https for all your links, to avoid mixed content. You also have a unnecessary space at the end of og:image content, but that should be no problem. 😉 Thanks. Well, ok, then I can only guess that WhatsApp was not working primarily due to a too heavy image - the Waypoint agency branding page (one you tried) is the only one on which I have optimized the og:image PNG (down from over 1MB to about 500KB). For the Meta share debugger errors - again, thanks to everyone for giving it a look. I will clean up all errors you've pointed out and update the post in case any of those fixes end up also making the debugger error go away. Edited October 15 by Žarko Kuvalja 1 Link to comment Share on other sites More sharing options...
Sanyaissues Posted October 15 Share Posted October 15 52 minutes ago, Žarko Kuvalja said: which I have optimized the og:image PNG (down from over 1MB to about 500KB) Also, you can still trim some fat, that image can be easily under 100kb. You can do it manually with squoosh (try jpg, that image don't need to be a png) or tinypng, or dynamically Link to comment Share on other sites More sharing options...
bernhard Posted October 15 Share Posted October 15 Don't know if that's the issue, but you have a space at the end of your image path: As I've had problems with getting og:image to work with WhatsApp + ProCache and the reason was ProCache removing quotes I'd bet it doesn't like your space at the end as well. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now