Question

Twitpic recently made changes to their API and their photo url 'http://twitpic.com/show/full/auuqys' is now getting resolved to a huge Cloudfront url (below)

http://d3j5vwomefv46c.cloudfront.net/photos/full/656484868.jpg?key=10231023&Expires=1347869743&Key-Pair-Id=APKAIYVGSUJFNRFZBBTA&Signature=gAU4mFGNs6qcrC5nE7~9FeVYXTiVJtpK9XUvkLTuQnAOZsNMysFxUuCLc8IkJh8iNdqSUXXEBk0A~0bMO~IHvI30zFL5oyOpEgmrLqCgbcml4rde75wgzARSmqLoLXNj37jLiv5pJ-mDj3Hqlp7KFxk-13HPApLRlIiW3SyC9Jw_

but Fancybox is unable to resolve and render but instead it gives an error

'Requested content cannot be loaded'. 

How do I render redirected urls using FancyBox. Please Help.

Thanks

Was it helpful?

Solution

From the fancybox FAQs:

I`m using custom urls for images (for example, index.php?action=dlattach;topic=3.0;attach=9;image) and FancyBox shows source of image. Why?

FancyBox gueses content type from url but sometimes it can be wrong. The solution is to force your type, like so - $(".selector").fancybox({'type' : 'image'});

This might help :)

http://fancybox.net/faq

OTHER TIPS

A more clever solution is to append at the the end of the url the image filename.extension

this won't work

index.php?r=generate/image&user_id=9

this will work

index.php?r=generate/image&user_id=9&dummy=dummy.png
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top