问题
Building my company website and want the image to display when I share the link on facebook. The correct meta description and titles show up for each page but not the images. The facebook debugger tool keeps giving me this error and everytime I share a link it says that it has an invalid content type.
I want my logo to appear for everytime I share a link on facebook so I have it extended in my base.html file.
This is in my base.html page:
<meta property="og:image:url" content="{% static 'img/ssg600.png' %}"/>
<meta property="og:image:secure_url" content="{% static 'img/ssg600.png' %}"/>
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="600"/>
<meta property="og:image:height" content="600"/>
<meta property="og:type" content="website"/>
The static link is attached to my aws s3 account and before I even started working with these meta tags, the image was displaying on FB just fine. Now its not working and I can't figure out why.
回答1:
I figured out the issue. I was dumb and ended up mistyping the static url. It was supposed to be {%"static 'static/img/ssg600.png' "%}
What I will say to anyone who is wondering why their pictures aren't appearing is to 1. Check your links, 2. Make sure your amazon s3 images are public (can do this by clicking on the link that is rendered on your site. If its public it will show up. Otherwise it will say access denied.) 3. Make sure your meta urls match the page that you rendered (Another page I had seemed to have the correct information but I had included the wrong meta url and so the image would not render properly."
来源:https://stackoverflow.com/questions/57662726/provided-ogimage-url-url-to-aws-s3-could-not-be-processed-as-an-image-becaus