New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
image doesn't show on web #903
Comments
I think we will have issue. https://stackoverflow.com/questions/44572387/failed-to-load-resource-neterr-blocked-by-response |
Quick solution: |
Got the same problem here. Did the copy workaround until the plugin bypasses it. |
The same issue was reported recently on proxified fork of this scraper ( https://github.com/restyler/instagram-php-scraper ). The StackOverflow link above is not exactly correct, it mentions different header related to iframes. Instagram now sets Base64 embedding suggested above will make your html page very heavy, especially if you render image feed with bigger thumbnails. It will also block the execution of PHP while it downloads each image, so if you have 10 images and downloading each takes 1 second, your page open time will become 10 seconds slower. Here is an example of CloudFlare image proxy:https://gist.github.com/restyler/6c51e3ad20d7596e799d76e87cf93236 Not that efficient, but easier to setup, PHP implementation:https://github.com/restyler/inwidget/blob/master/imgproxy.php It might be a good idea to add additional caching layer on the proxy to reduce the amount of duplicate image requests to instagram cdn servers. When you have your image proxy running, you just need to replace all instagram image srcs to the proxified versions. |
Same issue here, @raiym any update planned to work around this ? |
i'm usando |
@Gugiman How to implement this on the library please ? |
After obtaining the image link, simply encode it in base64.
You can create a function, for facility...
Use like: |
@sagitaire123 Solution from @veuxx is indeed easier by using file_get_contents instead of cUrl |
Any JS solution? |
Maybe something like this? But I'm not quite sure if js within a browser will be check for CORS again. |
And what is the solution for the displaying the video from Instagram? |
it works last month but this month it doesn't work anymore |
Not Working!!!!! |
Here it still works as normal... Instagram must be blocking the IP of their servers. Test it on another server or use a proxy! |
Won't the IP address of any proxy server you set up eventually get blocked? We were doing some scraping and got our server IP blocked. Then we started using Zyte which works for the scraping, but then the URLs are now blocked due to this ERR_BLOCKED_BY_RESPONSE error on each user's browser. I understand setting up a simple proxy bypasses the headers, but unless that proxy also uses a varying IP pool, won't it just get blocked too? Once IG sees a ton of requests coming from the same server IP? Similar to the scraping block we had on our server IP? It seems like any simple server image proxy must make its requests through another varying IP pool proxy, same when used when scraping, for it to ultimately stay working. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
i fetch posts by getMediasByTag and use to list the post image. it works perfect all the time but today i run it and images are not shown. when i paste the url to browser, the image works. it's a weird case and i wish to find out solution. thank you
The text was updated successfully, but these errors were encountered: