Strange behaviour with some images


It seems like some images can't be found on blog.thoehler.com/test
http://blog.thoehler.com/umbraco/ImageGen.ashx?image=No media is maching '1221'&width=800&height=600&constrain=true is generated instead of the image.
Closed Apr 22, 2009 at 12:40 PM by raly76


hoehler wrote Apr 22, 2009 at 11:20 AM

The media with id 1221 exists and the image there is http://blog.thoehler.com/media/967/WindowsLiveWriter_WLWPluginInsertUmbracoLinks_D24E_InsertLink3_2.png, all the images in the media folder exists. I will look into the code.

hoehler wrote Apr 22, 2009 at 11:30 AM

The error message comes from the umbraco.library.GetMedia, but it seems that it is only a timeout, the images get generated after reloading time after time...

raly76 wrote Apr 22, 2009 at 11:42 AM

Do you by any chance know how I can get the image url without using GetMedia?

raly76 wrote Apr 22, 2009 at 11:50 AM

This is my code:
var folder = new Media(folderId);
foreach(Media media in folder.Children)
XPathNodeIterator xn = umbraco.library.GetMedia(id, false);
url = "";
XPathNodeIterator xn2 = xn.Current.Select("data[@alias='umbracoFile']");
url = string.Format("/umbraco/ImageGen.ashx?image={0}&width={1}&height={2}&constrain=true",
                                       xn2.Current.Value, width, height);

Are there a better way to get the url in a usercontrol?

raly76 wrote Apr 22, 2009 at 12:04 PM

Ok, how could I forget about the getProperty?
I'm testing. Will upload new version soon.

wrote Apr 22, 2009 at 12:40 PM

Resolved with changeset 9446.

wrote Feb 1, 2013 at 12:55 AM

wrote May 14, 2013 at 3:25 AM