PCasagrande
PCasagrande

Reputation: 5402

Umbraco not allowing httphandler resized image to be input

I am attempting to move legacy content into Umbraco v4.9.1. Some of the photos that are being migrated are being resized using an httphandler (ImageResizer.ashx) using variables passed through the query. When I attempt to save the path the url is replaced with either "/" or what the path originally was. Is there a work around? The tag is below.

<img src="/imageresizer.ashx?mw=232&src=/imagePath/image.jpg" />

The url is correct, because if I type it into a browser the image comes up fine. It seems like Umbraco is filtering out this url.

UPDATE: I am noticing that the editor is chopping off everything before /imagePath/image.jpg and only displaying that. I have tried turning off the TidyEditorContent in the UmbracoSettings.config and it still does this.

Upvotes: 2

Views: 339

Answers (1)

mwijnands
mwijnands

Reputation: 1236

A workaround would be to UrlEncode the src part of these Urls, where "/" is replaced by "%2F".

<img src="/imageresizer.ashx?mw=232&src=%2FimagePath%2Fimage.jpg" />

I don't know if you can do this is your particular situation, but it is a workaround.

Upvotes: 1

Related Questions