But you can specify an ?altImage= that will be used if the source image isn't found. I use this a lot in staff listings... when a person's headshot isn't available ImageGen will use an alternate image (an outline silhouette) instead. I could check for this situation in my macro code but having ImageGen take care of it simplifies my macros.
Yes, It works fine. But the problem is that I would need to touch every .xslt in my project and explicitly add that parameter. This is something I'm hopping to avoid.
Config modification doesn't seem to work, so I've decided to go with url param. Anyway it would be great to have this feature in next versions of the package.
Possible to change the "Hello, World!" image
Hi Doug
Is it possible to change the image(or text?) that says "Hello, World!", if an image is not found?
No, you can't change the text itself.
But you can specify an ?altImage= that will be used if the source image isn't found. I use this a lot in staff listings... when a person's headshot isn't available ImageGen will use an alternate image (an outline silhouette) instead. I could check for this situation in my macro code but having ImageGen take care of it simplifies my macros.
cheers,
doug.
Can I just add the altImage to the string that I'm already using then?
Right now this is the code I'm using:
How would it look if I want to add the altImage then?
Because right now, the "Hello World" is of course show if an image have been deleted from the media-section, but not removed from a page.
Check the docs for all the details, but this would be the kind of think you'd do...
cheers,
doug.
Thanks Doug.
My bad that I didn't check out the documentation first. I simply didn't think about it. But this works perfectly.
/Kim
Hi,
I use ImageGen.dll in my website(not umbraco).
When I write
http://localhost/MySite/ImageGen.ashx?image=http://localhost/MySite/images/temp/44-89-ArticleImage1.jpeg&width=132&height=132
I get
Images must be local to the webserver or in the whitelisted domain list.
What do I need to change to fix it?
Thanks,
Katz
Hi,
I use ImageGen.dll in my WebSite(not umbraco).
When I write
http://localhost/MySite/ImageGen.ashx?image=http://localhost/MySite/images/temp/44-89-ArticleImage1.jpeg&width=132&height=132
I get Images must be local to the webserver or in the whitelisted domain list.
What do I need to change to fix it?
Thanks,
Katz
This helped, but would be good if you could add some default text in the dictionary or in the querystring.
Hi guys.
I would like to replace "Hello World" image with my own one.
Do I still need using "&altimage" param or there's better solution now?
Hey Ivan,
Did you try it out?
Rich
Hi Rich.
Yes, It works fine. But the problem is that I would need to touch every .xslt in my project and explicitly add that parameter. This is something I'm hopping to avoid.
Hey Ivan,
Understood, you could try adding the parameter to the default class in config/ImageGen.config ?
(Have no idea if this works)
Rich
Hey Rich,
Config modification doesn't seem to work, so I've decided to go with url param. Anyway it would be great to have this feature in next versions of the package.
is working on a reply...