PDA

View Full Version : Shortening image url when using src="



OurJud
Mar 31st, 2010, 03:48 PM
I'm using JavaScript and the mouseover function as a means of cycling through various images on my photoblog here: http://exp212.blogspot.com/

In other blocks of code I've seen for doing the same thing, they've shortened the url so that instead of


src="http://1.bp.blogspot.com/_P6fRcsNpSXY/S7KcZFPsRjI/AAAAAAAABlQ/zTeXETbrK9g/s1600/fly_medlockvalley.jpg"

They'd have something like:

src="...s1600/fly_medlockvalley.jpg"

Is this something anyone can just do or are their special requirements before this can be done?

mbaker
Apr 1st, 2010, 06:14 PM
I don't use blogspot and you have not been explicit in where you have seen something like:

src="...s1600/fly_medlockvalley.jpg"
Was that on blogspot, and was it that exact format? I doubt is was that exact format, because its not a standard URL, so browsers would not know how to interpret it.

It could be that you have seen a shortened url. My favourite service was http://tr.im/ , but I've just discovered that they are closing down. However they do list lots of alternatives. One is http://j.mp/ , which is powered by bit.ly (but two characters shorter). This lets you create custom shortenings, such as http://j.mp/fly_mv_mb for the URL of your image.

Having discovered that j.mp allows custom shortenings, I'll probably switch my allegiancies there. As well as custom shortenings, they also provide real time stats on numbers of hits on each of your links.

OurJud
Apr 1st, 2010, 08:20 PM
Sorry for taing so long to reply, mbaker.

I honestly don't remember where I saw those shortned urls (I think it was some example code I was given by Old Pendant when I was struggling with my javascript gallery)

I'll take a look at those links. Thanks very much.

effpeetee
Apr 1st, 2010, 09:56 PM
Is this any use (http://www.flickr.com/services/api/misc.urls.html)?

More useful stuff here. (http://exitfegs.co.uk/Sources.html)

Frank.

OurJud
Apr 2nd, 2010, 12:26 AM
Thanks, effpeetee, the site at your second link is vast! and has gone straight in as a bookmark.