The "babypics" folder is a virtual folder, stored outside of the main webroot, but I've tried all sorts of variations and cannot get the images to display... Help.
Whatever you include in the ImageBaseDir setting will be prepended to the ?image= parameter you pass on the querystring.
For instance, if you have an image at /media/productphotos/prod1.jpg you would request it at localhost/media/productphotos/prod1.jpg.
If you have an ImageGen class named 'product' with <ImageBaseDir>/media/productphotos</ImageBaseDir> you would use localhost/imagegen.ashx?image=prod1.jpg&class=product
In your examples you include /images in the ImageBaseDir and also include it in the image= parameter, which means ImageGen will be looking for your photo at /images/images/babypics/babyportraits/...... which isn't what you want.
Doug, I actually tried that but will try again. You're using "localhost", but do I need to use "localhost" and/or have Pro in order to use an image base directory outside of my webroot? I guess that's what I was asking.
Yes, you do need Professional to use the 'class' feature. You can test by trying it on either localhost or any *.local domain, which have the Pro features always enabled.
Can't get
Having a really hard time getting ImageBaseDir to work...
This works:
http://beta.lourdes.com/images/babypics/babyportraits/512824419/512824419_1.jpg
This does not:
http://beta.lourdes.com/ImageGen.ashx?image=/images/babypics/babyportraits/512824419/512824419_1.jpg&class=babies
My config file:
<Class Name="Babies" OverridesQueryString="true">
<ImageBaseDir>/images</ImageBaseDir>
</Class>
The "babypics" folder is a virtual folder, stored outside of the main webroot, but I've tried all sorts of variations and cannot get the images to display... Help.
Hi, Robert,
Whatever you include in the ImageBaseDir setting will be prepended to the ?image= parameter you pass on the querystring.
For instance, if you have an image at /media/productphotos/prod1.jpg you would request it at localhost/media/productphotos/prod1.jpg.
If you have an ImageGen class named 'product' with <ImageBaseDir>/media/productphotos</ImageBaseDir> you would use localhost/imagegen.ashx?image=prod1.jpg&class=product
In your examples you include /images in the ImageBaseDir and also include it in the image= parameter, which means ImageGen will be looking for your photo at /images/images/babypics/babyportraits/...... which isn't what you want.
cheers,
doug.
Doug, I actually tried that but will try again. You're using "localhost", but do I need to use "localhost" and/or have Pro in order to use an image base directory outside of my webroot? I guess that's what I was asking.
Hi, Robert,
Yes, you do need Professional to use the 'class' feature. You can test by trying it on either localhost or any *.local domain, which have the Pro features always enabled.
FWIW, this link does work: http://beta.lourdes.com/ImageGen.ashx?image=/images/babypics/babyportraits/512824419/512824419_1.jpg&width=50. So if you don't need the classes you can still do what you want with the free version.
cheers,
doug.
is working on a reply...