0

get posts from an API and sometimes the image those posts contain is like this: https://i.ytimg.com/vi/e5wXRrQfooc/default.jpg

But when I put it in a

<img src="https://i.ytimg.com/vi/e5wXRrQfooc/default.jpg" />

It displayed a missing image icon:

http://jsfiddle.net/x8hmxovc/

It seems thats their return 404 image, but how do I get it when all I have is the url?

AlexD
  • 4,062
  • 5
  • 38
  • 65

2 Answers2

0

I think you are using the youtube API to show the video thumbnails There are a lot of posts already dealing with this i think

Like these ones: How do I get a YouTube video thumbnail from the YouTube API?

Url of large image of a YouTube video

YouTube thumbnail link doesn't work in all cases

Community
  • 1
  • 1
code1x1.de
  • 304
  • 2
  • 13
  • Thanks. Yes indeed i'm using youtube api and I am aware the user doesn't exist anymore / video was removed - how can I know it though by having the url only? I have a fallback-src url for those cases, but those links don't fallback but instead return me an image, but I can't display it – AlexD Mar 29 '15 at 13:49
0

By the way the Youtube Account which this thumbnail contained doesnt exist anymore I think

If this is the link to the Video https://www.youtube.com/watch?v=e5wXRrQfooc

code1x1.de
  • 304
  • 2
  • 13