TheGeekZn
TheGeekZn

Reputation: 3924

ImageResizer not working on <img> Tags

I am using ImageResizer from ImageResizing.net.

Through my code, I am able to programatically use the plugin using this code:

img.Attributes.Add("src", RemoteReaderPlugin.Current.CreateSignedUrl("http://i.minus.com/iNQ7wK2opRJT1.gif",
                                                                             new ResizeSettings(
                                                                                 "width=233&format=png")));

But, When I try to directly use the Plugin with the <img /> tag, such as:

<img id="img" alt="" src="http://i.minus.com/iNQ7wK2opRJT1.gif?width=90" />

It simply renders the full size image. Through both methods, I'm just adding the src to the image, followed with the query string.

Does anyone know how to fix this?

Edit: I am using skins, but they aren't messing with <img /> at all.
Edit 2: I have the RemoteReader Plugin

Upvotes: 1

Views: 303

Answers (1)

Lilith River
Lilith River

Reputation: 16468

ImageResizer can only process HTTP requests it receives; it does NOT magically modify your HTML for you. URLs that point to a different server... go to that server.

The RemoteReader plugin offers an alternate human-writeable syntax, but you must whitelist the domain as specified in the RemoteReader documentation.

Example:

<img id="img" alt="" src="/remote/i.minus.com/iNQ7wK2opRJT1.gif?width=90" />

Upvotes: 1

Related Questions