codemonauts / craft-instagram-feed

Craft CMS plugin to receive Instragram feed data as variable in templates
MIT License
27 stars 7 forks source link

Images not displaying #29

Closed mbuskies closed 4 years ago

mbuskies commented 4 years ago

Using the following code it outputs all of the text (caption, likes, comments) but not the image. The image URL is being loaded in the code but not shown on the website. I'm developing locally. Any ideas why this would be happening? Thanks!

{% for item in craft.instagram.getFeed() %}
<a href="https://www.instagram.com/p/{{ item.shortcode }}/" target="_blank">
  <img src="{{ item.src }}" alt="" />
</a>
<p>{{ item.caption }}</p>
<p>{{ item.likes }} Likes / {{ item.comments }} Comments</p>
{% endfor %}
kringkaste commented 4 years ago

Hi! If you see the image URLs in the source of your page but they will not displayed, maybe the browser gives you the answer in his console window? Can you check this in your development console? What HTTP return code have the requests to the images?

mbuskies commented 4 years ago

Hi, I will try and do that and post what I come up with. Thank you!

jdsimcoe commented 4 years ago

@kringkaste I'm getting 403 errors on https://atheycreek.com. It only happens for video posts:

Failed to load resource: the server responded with a status of 403 ()

You can go to the URL above and see it in action.

fleaz commented 4 years ago

Hi @jdsimcoe just a few days ago I saw this feature working on a customer site, so IG must have made some changes in the last few days which broke the plugin. We will look into this and try to fix it. Thanks for the report :)

jdsimcoe commented 4 years ago

Thanks @fleaz. Appreciate the help.

jdsimcoe commented 4 years ago

@kringkaste @fleaz I should add that on my local dev server everything is working fine. On production, the feed is not updating at all and I'm getting 403 errors.

ljclark commented 4 years ago

I'm also getting this same error - works fine locally, but no images appearing on production.

fleaz commented 4 years ago

Hey @ljclark @jdsimcoe

if the plugin works in dev but not in production you both probably hit this problem: https://github.com/codemonauts/craft-instagram-feed/issues/4#issuecomment-609842110

tl,dr: Instagram has a very fussy bot detection algorithm which sometimes blocks your IP from getting the data then our plugin will fail. Once on the list, to our knownlege, you stay on there forever.

Fix: As a temporary workaround we added proxy feature which redirects all requests to IG through a sever from us which is known good. Just drop a mail to support@codemonauts.com and we will provide the infos to use this.

DaveBeirne commented 4 years ago

yes i am also getting no images loading and it worked previously with your plugin :(

fleaz commented 4 years ago

Hey @DaveBeirne as mentioned in the previous comment, just drop as a mail and we will provide you with the details on how to use our proxy :)

richhayler commented 4 years ago

Hi @fleaz, I’m also running into the same issue as described above. I’ve sent an email to support@codemonauts.com requesting access to your proxy. Happy to help with any testing or workarounds. Thanks.

richhayler commented 4 years ago

Thanks for the help @fleaz 👍