Images Broken in /Videos API Request?

Avatar image for conmused
Conmused

47

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#1  Edited By Conmused

There are a sizable number of results with broken images in /videos responses. It looks like the original upload file changed extensions at some point, but whatever the API hits never got updated. I did a quick run through the /videos endpoint, paginating through the first 1000 results of each video_type, discovering about 277 items (mostly trailers) with broken images. I can paste in the broken urls, if 277 links won't get me flagged as spam.

Example Results:

  • API Response (broken): http://static.giantbomb.com/uploads/scale_small/21/211414/2791948-screen+shot+2015-10-21+at+5.50.41+pm.png
  • Site URL (working): http://static.giantbomb.com/uploads/screen_small/21/211414/2791948-screen+shot+2015-10-21+at+5.50.41+pm.jpg

(I know the base urls are different, but screen_small isn't even an option in the api response. The problem lies with the file extension, not the rest of the path.)

They're almost all mac OSX screenshot files, or images named 'untitled', or 'Image'. Every broken file seems to be a png that needs to be a jpg. A handful have actual names, for example, the GOTY images from 2014. Unless taking a system screengrab is standard for uploading videos, I'm guessing someone had a process that routinely broke something within the API.

I planned on throwing in placeholders onError (or given the extension-pattern, I'd probably just try hot-swapping extensions first), so it's not like functionality or layout will break for my app. But is it possible to get these urls fixed?

Edits: Just being a little more clear.

Avatar image for szlifier
szlifier

1518

Forum Posts

120

Wiki Points

0

Followers

Reviews: 0

User Lists: 4

@conmused: This seems to only happen on user uploaded videos, the stuff they record at home.

I created a workaround for my site where I use two image URLs for a background of a <div>. One with .png and one with .jpg. I only do this for files that end with "+am" or "+pm". Seems to work fine.

Avatar image for conmused
Conmused

47

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#3  Edited By Conmused

@szlifier: Hmm. That's a cleaner solution than what I'm using.

Currently I listen for an error on video images, then swap out the extension. If it errors again I throw in a placeholder. I'm using react, so it's all componentized and easy to throw in anywhere. Plus, it means I never have to worry about cropping... but at the cost of triggering a recalc on every single error.

Edit: Bah, apparently using background image like that would still trigger a repaint, and potentially throws it on images that don't need any help. ( source: http://csstriggers.com/ )

I'll need to think on this a bit more. Maybe I can listen for a request error on a background image property, or something?