Simple Rivals/Yahoo Image URL Decoder

Really enjoy this tool? Help me raise money for the National MS Society by making a small donation.

I’m a subscriber to Orangebloods, a Rivals network website that covers Texas Longhorn Sports and Recruiting. People post and share images all the time and a user posted the question below earlier this week when frustrated by Rivals automatic rewriting of images to pass through Yahoo’s CDN.

Photos that users paste on this Rivals Message Board have a URL that begins with https://ec.yimg.com and if you try to copy that photo into a message on another message board you just get a red X. Why?

After writing the explanation below, I decided to take 15 minutes to write some quick JavaScript to reveal the REAL image URL when given the Rivals/Yahoo CDN URL.

My Explanation:

Rivals is doing that to speed up the site. Looks like they are taking advantage of Yahoo’s CDN (Content Delivery Network) to offload serving images from Rivals main servers.

As to why those links don’t work elsewhere, they are likely blocking external references to limit their bandwidth costs. When people take an image URL from one site and post somewhere else (called hotlinking — see Wikipedia),  the site where the image originates has to deal with sending the image to the end user. If you have hundreds of thousands of people doing this …. it equals big expenses and slow performance. By making those external hotlinked image references break, Yahoo is preventing people from doing this and stealing their bandwidth.

On to the good part. To get the real Image link do the following.

Right-click on the image and choose “Copy Image URL”

You should get something like this : https://ec.yimg.com/ec?url=http%3a%2f%2fvinylmeltdown.com%2fwordpress%2fwp-content%2fuploads%2f2012%2f02%2fheader.jpg&t=1424285195&sig=Ms9hzzO6zoaz1fmmlbeUkA–~B

Notice the part that I bolded and underlined … right after the url= and before the &t …. that’s an encoded version of the real image URL.

Copy that part ….. go to http://urldecode.org/

Paste the encoded URL in the box and click decode. You will then have the real image reference. In this case, it was:

http://vinylmeltdown.com/wordpress/wp-content/uploads/2012/02/header.jpg