In Progress

Detecting Flickr image redirect to photo_unavailable image

Provide browser based javascript code that will detect when a Flickr photo is not available and then display another image in its place.

[url removed, login to view] code shall work with a standard html img block. For example:

<img src="[url removed, login to view]">

[url removed, login to view] javascript code shall work in Chrome, IE, FireFox and Safari.

[url removed, login to view] when an arbitrary flickr image url is redirected to the photo_unavailable image. For example, the image url used for item 1 above, will be redirected to: [url removed, login to view]

[url removed, login to view] code shall make a callback to a function that will provide a substitute URL for the unavailable url and then attempt to display the substitute image. For example, the following url will render correctly: [url removed, login to view]

[url removed, login to view] user shall not see the photo unavailable image, since the substitute image shall be rendered in its place

I've attached a test file named redirect.html and a file that displays the expected results named redirectExpectedResutls.html.

The javascript code shall detect that the first two image resources in redirect.html are redirecting to the photo_unavailable image and that the third image does not redirect.

Any image that redirects to photo_unavailable shall be substituted with:

Images that don't redirect shall be rendered as expected.

Thus the first two img directives shall display the substitute url instead, while the last img directive shall render the url identified with the src attribute.

The javascript code shall be general purpose and thus work with any arbitrary image resource urls.

Skills: HTML, Javascript

See more: javascript detect image redirect, javascript detect image unavailable, photo_unavailable, redirect url flickr, flickr detect image unavailable, image in html 5, html 5 img, flickr image unavailable, callback url, image render, flickr, browser detect, javascript callback, display url javascript, detect browser redirect, static gif, html img, http redirect, redirect code, redirect url code, url chrome browser, firefox chrome url, browser redirect, http redirect code, display image

About the Employer:
( 16 reviews ) Leesburg, United States

Project ID: #1151257