Welcome Guest, Not a member yet? Register   Sign In
Image_lib and thumbnail names

Apologies for making a third post in the last two hours. I'm having a difficult time working with image_lib and GD. Although I have it successfully creating thumbnails for me, the filename it saves it as makes it hard for me to load the thumbnails without using the overhead of regular expressions.

For instance if I upload foo.jpg to the server, using the following code:

// let's create a thumbnail while we're here.
            $config['image_library'] = 'GD2';
            $config['source_image'] = "$uploadFile";
            $config['new_image'] = "$uploadDir/$filename";
            $config['create_thumb'] = TRUE;
            $config['maintain_ratio'] = TRUE;
            $config['width'] = 75;
            $config['height'] = 50;

It gets saved as foo_thumb.jpg. Is there anyway to perhaps save it as thumb_foo.jpg instead? This would be easier so when I load images after upload to the server, I can do something like:

<img src="thumb_$file">

If that's not possible, I need an easy way to find thumbnails when I search a directory from recently uploaded files. I want the only thumbs to get loaded into the view versus the original image cause some of them are huge.

Thanks for any suggestions all.

- sf

Theme © iAndrew 2016 - Forum software by © MyBB