Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert J. Bullock 380 posts 398 karma points
    Apr 23, 2013 @ 19:20
    Robert J. Bullock
    0

    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.

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Apr 29, 2013 @ 17:53
    Douglas Robar
    0

    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. 

  • Robert J. Bullock 380 posts 398 karma points
    Apr 29, 2013 @ 18:03
    Robert J. Bullock
    0

    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.

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Apr 29, 2013 @ 18:09
    Douglas Robar
    0

    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. 

Please Sign in or register to post replies

Write your reply to:

Draft