Has anyone else had issues resizing to a width of over 500 pixels and have had issues? If I only define one variable, it can only resize to 500 pixels and under. However, if I provide both a width and a height, I am able to go over 500 pixels of width.
More information about my issue can be found at reply #202 of this thread.
Our PHP/Programming guru has identified an issue in the pi.imgsizer.php file which prevented the plugin from working on our server.
According to him this code (lines 147-151) were giving the plugin the wrong path to the images.
if (array_key_exists('DOCUMENT_ROOT',$_ENV))
{
$img_rootstep = $_ENV['DOCUMENT_ROOT']."/".$img_base;
}
else
Removing these lines so that
{
$img_rootstep = $_SERVER['DOCUMENT_ROOT']."/".$img_base;
}
became the path allowed the plugin to work as advertised.
Our guy thinks it has to do with how cpanel is installed in certain hosting environments. With the code above in place, the plugin was trying to find the image directory inside the directory for cpanel instead of the accounts directory.
Hope this helps some folks….
No go here. I’ve placed cache directories where they should go with 777 permissions, I’ve tweaked all the variables, and I’ve even hard coded image urls rather than use EE tags for gallery entries. No matter what I do the Image Sizer plug in does not parse. Nothing is returned, just blank space? Any ideas? I’d love to use this rather than phpThumb.
I’ve been using this fabulous plugin with no problems, but today I built a new site and Image Sizer just refuses to work in it. I’ve created the cache folders and all that. I’ve had server admin double check all the settings.
At first I thought it might be because the website and the control panel are accessed via different URLs/folders, but then I realised I already have sites set up that way and working fine.
The only real difference I can see between this new site and the others is the structure of the URL. All the others are www.anu.edu.au/area, but this new site is www-area.anu.edu.au
I tried the suggestion a few posts back from impdesigns about removing the _ENV lines, but this didn’t have any effect.
Any suggestions?
Sorry, a bit vague wasn’t it?!
When I use a regular image tag, the image displays fine in the page. When I add the Image Sizer tag, no image displays.
No cache folders were/are being created. So I went into the server and created them myself. But there are still no images in it.
I’m thinking that maybe it can’t find the right path, since Image Sizer works fine on all my other sites. All my other sites have the same start to the URL, and the image path has the same start - www.anu.edu.au/area
This site has a different url: www-area.anu.edu.au, and the images are at www.anu.edu.au/area I’m thinking about getting the admin to change the url, just to see if it fixes the problem. Will report back if/when I get anywhere with this.
Thanks for your help. 😊
Deborah,
Have you made sure the cache folders have the proper permissions since you’ve created them? Since there all hosted on the same server, I don’t think there is an issue with the different url’s, as you’ve provided direct paths to the folders themselves on your host.
And one more thing.. Are you using single tag or the tag pairs? I’ve had more success with the tag pairs than otherwise.
Yup, checked those cache folders - open to the world!
Here’s the block of code where I have attempted to display the image. In the profile form I have a relationship field that links to a photo gallery.
The regular img tag works fine (1), but neither of the imgsizer ones (2 and 3) display anything (or create anything in the cache folders).
Code looks clean.. Looks like I won’t be of much help, but in any case you might be right about the absolute paths, etc. to the images on your box. Have you tried running Image Sizer on a more simple task, such as just resizing a weblog entry associated image rather than the related entries to try and isolate/determine the issue?
If I have a square image and I want to resize it to a rectangle by cropping off equal bits from the top and bottom can Image Sizer do that? In other words I don’t want it to resize the image proportionally, I just want it to crop off the excess. For example if it is a 500x500 image and I set the height to 250 I want a cropped image of 500x250
From reading through this post I think the answer is no, but I wanted to be sure I’m not missing something.
Fantastic plugin btw. I may not be able to use it on this project (need the above functionality) but I am sure it will come in handy in the future.
mr_dimsum, I tried something much simpler, like placing an image in a folder on the server and manually entering the URL. Again, normal IMG tag displays it fine, but Image Sizer doesn’t do anything with the image. Something strange going on here. Will hold off further testing until my admins change the URL for access and see what happens then I think.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.