How to hotlink images?

Topics: ASP.NET 2.0, Controls
Jan 15, 2008 at 9:47 AM
Does anyone know how to hotlink images from posts?
If you're posting in a forum and want to hotlink to an image in your blog it cannot be done since the image url is handled by the image.axd handler.
The url becomes: www.myblog.com/image.axd?picture=mypic.jpg which gets blocked by most forums.

There is also no way to directly hotlink to images by pointing the url into the App_Data folder, since it won't give you permissions to do that.

Suggestions anyone?

Cheers!
- jonah
Jan 21, 2008 at 4:31 PM
bump...
Jan 21, 2008 at 6:24 PM
So this doesn't work for you?
<img src="http://www.example.com/image.axd?picture=image.jpg"/>

It works for me...
Jan 21, 2008 at 6:29 PM
Nope, not when doing posts in, for example, PHPBB forums.
The forum software blocks the code when it is not directly hotlinked to an image..
- jonah
Jan 22, 2008 at 4:52 AM
When it comes to BE I think you are out of luck.

However if you use Windows Live Writer to write your post there is a work around.

In WLW you can specify what it should do with images, and you can have it ftp them to a special (public) directory and then you should be able to hotlink it from there.

Interesting thought to have an option to have your images stored in a public folder if you choose.
Jan 22, 2008 at 6:02 AM
Awrity, thanks for the info!
And, yes, I think it would be nice to have the option to have images stored in a public folder. In that case, however, it would be harder to prevent others from hotlinking your images.

Cheers!
- jonah
Jan 22, 2008 at 11:56 AM
Well you can't have it both ways... either you (and everybody) can hotlink the images, or you (and everybody) can't.

And with your current problem, you can still hotlink the images, just that the forums you visit don't accept the URL.