NKT com: all you need to do is to make the directory that imgsizer is looking for. imgsizer wants to store its cached thumbnails in it, but it can’t because it doesn’t exist.
To figure out where imgsizer wants to make its storage directory, turn template debugging on from the Control Panel. Then, look at all the messages that show up on the bottom of the screen when you reload your template with the imgsizer code in it. One of the messages towards the middle will be an error (cache_path perhaps?) that will tell you that it couldn’t make /home/example.com/public_html/images/sized/ or something of that sort.
Make that directory, and you should be good to go.
Warning: mkdir() [function.mkdir]: Permission denied in /home/site/public_html/system/plugins/pi.imgsizer.php on line 205
This means that you need to change some folder permissions to 777 (or create the folders that imgsizer uses to store its cached, sized images.) Do
chmod -R 777
on all the directories that you store your images in: the directory that the image is uploaded to, and the “sized” directory, probably in the same directory that your images are uploaded to. If you don’t have a “sized” directory, you’re either looking in the wrong place, or you need to make one.
To see where imgsizer is expecting all of its folders to be, turn template debugging on in the CP and re-load the template with the imgsizer tags in it. Scroll down a bit, and you’ll find some useful errors.
I’ve now encountered this error when uploading a 4.5mb photo approx 4000x3000px using solspace upload plugin
The following errors were encountered * file_exceeds_ini_limit
I’ve removed any max photo dimensions and file size in cpanel for this folder, so I don’t know what is going wrong.
UPDATE:
When I upload via the cpanel, I get this error:
The uploaded file exceeds the maximum allowed size in your PHP configuration file
When I look at config.php in my system folder I don’t see any reference to file dimensions. So I am confused.
UPDATE: The above problems have been resolved (well almost)
Does anyone know if I need more ram if I have image sizer sizing 10 large images on the same template as opposed to 1 large image?
Does it resize all photos at the same time or does it do it one at a time and therefore only need enough ram for one photo at a time?
Thanks
I’ve got a curly one here… I’m using the remote param to fetch some images on another website, but these images (charts actually) are being generated dynamically from an ASPX page using the data fed from GET vars in the URL, like this one here:
http://metalprices.com/PubCharts/PublicCharts.aspx?metal=pt lon&type=V&weight=KG&days=1&size=M&bg;=&cs=5&cid=0
Now, the problem is that while the imgsizer tag downloads the correct image, it saves the filename as ‘metalprices-com-PubCharts-PublicCharts.aspx’. This is a problem because A) my server doesn’t seem to want to serve the file with an aspx extension as an image, and B) if I try to load multiple images from the same URL (but with differing GET values), then it tries to use the same filename each time, which ain’t no good..
Soo… is there any way to make it save the file with a specified extension (jpg instead of aspx), and also include the GET vars in the file name?
Awesome Plugin! This thing is extremely useful.
I don’t know if anybody posted this yet, but i found myself needing to crop images, but have them aligned to the top rather than the center.
To do this, simply find Line 597 in pi.imgsizer.php
imagecopyresampled($image_resized, $image, -$int_width, -$int_height, 0, 0, $adjusted_width, $adjusted_height, $width_old, $height_old);
Replace -$int_height with 0. The revised code looks like this:
imagecopyresampled($image_resized, $image, -$int_width, 0, 0, 0, $adjusted_width, $adjusted_height, $width_old, $height_old);
Now re-upload the plugin, clear the cache, and your cropped images should be aligned to the top!
Hope this helps somebody! 😊
Thanks Jon, I was looking for something quite like this, but will do for now. I mentioned a feature a couple post back that would allow you to specify a corner to crop from, have a looksee (http://ellislab.com/forums/viewthread/62138/P540/#632096), do you think thats possible?
Is it possible, to have imgsizer show the cached images if the originals have been deleted? Trying to free up server space…
No you can’t do that easily. Image Sizer checks for the original image and then checks if there is a cached version available.
What you could do, is create a 1px * 1px image with the same name as the original image so it will read that.
I’m experiencing some strange things using image sizer plugin.
If I pass ‘/images/uploads/10123_132222216486_661796486_3039866_7727135_n.jpg’ image as a src path to the plugin, it will created resized image in the ‘images/sized/images/uploads/<filename>…jpg’.
Why does it have to create 2 subfolders - /images/uploads/ from the src image? I tried changing the base_cache to ‘/images/sized’ but it wont work if I do that..
How can I solve that issue?
Thanks for help!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.