Thanks for the reply mr_dimsum. I did read the entire thread including your question (as well as the documentation) I just never quite understood the answer (sorry, sometimes what is clear for one person may not be for another. People are just different I guess.)
At any rate, I have tried it with all the variations I can think of including height no width, width and height and setting auto= as the author replied to one post but I always end up with a square.
I am sure you are right and I am just misunderstanding or missing something but as of yet I am unable to get it to crop from a square to a rectangle.
I still can’t get Image Sizer to work on my site :( I think it may be somehow connected to access to the cache folder/s for this particular site.
I have a number of sites installed via Multiple Site Manager and a number of Photo Galleries. I want our Alumni Website and the Alumni Photo Gallery to hook up.
I can use the Alumni Photo Gallery in any other site with Imagesizer and it works fine. It finds the image folder and adds the image to the cache area, then displays the image on the site.
It doesn’t matter which Photo Gallery I try to use with the Alumni Site - nothing will display within the Image Sizer tag, and no other version of the image gets loaded to the relevant Cache folder. It doesn’t matter whether I try to do it via Related Entries or even hard code the URL in. No image is displayed.
So it could be a permissions problem? Does anyone have any advice on what settings I could check?
I am having the same issue as Deborah. If I use:
{feature_photo}
the image shows up fine, but if I use
{exp:imgsizer:size src="{feature_photo}" width="200" height="100" debug="1"}
no image displays. The debug parameter causes the message “/image.jpg is not readable” to show. No images show up in the cache folder either. It is set with 777 permissions.
The site I am working on is under redesign. I have EE installed in a sub-directory “/gm/ee/”. I have tried the suggestion to use “cache=’no’” with no luck. I also tried impdesigns’ solution to alter the PHP plugin.
If anyone has any suggestions, I’m willing to try anything. Thanks in advance.
I’d really love to give this plugin another chance, but I seem to have the same problems as the last two posts: I cannot get it working.
phpThumb works just fine, but I think imgsizer would be a lesser overhead than phpThumb, as I really only need the resizing and not all the other fancy stuff phpThumb can do.
Any ideas? Also adding debug=”1” parameter does not give me anything, digging into the code does not seem like an option timewise.
EDIT: I’m guessing where the error is, the site is still under production and running on a “temporary” URL (not the actual domain yet) containing http://someserver.com/~username in the url. That might be the problem as so often with many plugins.
I’m gonna report back as soon as we got it up and running on a domain.
Debugging didn’t give me any information of interest: (0.387105) Parsing Tags in Template (0.387251) Tag: {exp:imgsizer:size src="http://oursite/folder/080220ANU-111.jpg" width="50px" height="50px" alt="<p>Detail of poster advertising the ANU Film Society </p>" title="080220ANU-111" } (0.387904) No Closing Tag (0.388190) Tag: {exp:imgsizer:size src="http://oursite/folder/TanHaur.jpg" width="50px" height="50px" alt="<p>Tan Haur </p>" title="Tan Haur" } (0.388660) No Closing Tag (0.388829) Processing Tags (0.388941) Plugin Tag: Imgsizer/size (0.389003) Plugin Tag: Imgsizer/size (0.389051) Including Files for Tag and Modules (0.396382) Beginning Final Tag Data Processing (0.396486) Calling Class/Method: Imgsizer/size (0.396847) -> Class Called: Imgsizer (0.396918) -> Method Called: size (0.397597) -> Data Returned (0.397743) Calling Class/Method: Imgsizer/size (0.397972) -> Class Called: Imgsizer (0.398027) -> Method Called: size (0.398514) -> Data Returned (0.398650) - End Tag Processing -
Deborah Cross & Derek Greer
it looks like for some reason it is not locating your image
that so far has been one of the parts of this plug-in that is really tricky. Short of putting a param for the EE set filedir or hardcoding DOCUMENT_ROOT in as a param on the tag, the plug-in has to try and figure out where the image really is on the server.. I did not want to use the filedir settings from the EE CP because i did not want to limit the plug-in to working only within a directory.
it works grate for me on EngneHosting and Dreamhost but it relies on ether the Server set variables or Environment Variables DOCUMENT_ROOT because you are not hard coding the full root path in.
I posted a new version that may help. it also has some more output if using debug=1 to help troubleshoot
anyway short of me logging into your account its hard to nail down a problem if i cant reproduce it.
also any variables passed into the src=”” have to be local to the domain running the tags it will not fetch remote URL’s from other domains even if those domains are on the same server.
also Deborah
{exp:imgsizer:size src="http://oursite/folder/TanHaur.jpg" width="50px" height="50px" alt="<p>Tan Haur </p>” title="Tan Haur” }
i am assuming that “http://oursite/folder/TanHaur.jpg” is not really what you are passing into the src= also you have paragraph tags in your alt=”” and your title= has a different encoded quote that could just be the way you copied and pasted into the forum
Thanx David. Yes the code I dumped in is not 100% what we are doing. I removed our url for security. The whole P tag thing is a problem we’re having with the caption field in the image gallery. I do think the quotation problem is something to do with cutting and pasting as it appears fine in our code, but I’ll double check.
I’ll download your file and give it another go and report back here.
Thanks for the update. Here is my new debug information:
src = /gm/ee/images/feature_photos/secs_state-24414-381_575.jpg
img_base = /gm/ee/images/feature_photos
img_basename = secs_state-24414-381_575.jpg
img_extension = jpg
img_filename = secs_state-24414-381_575
img_rootstep = /usr/local/apache/htdocs//gm/ee/images/feature_photos
img_rootpath =
img_fromroot = /secs_state-24414-381_575.jpg
/secs_state-24414-381_575.jpg is not readable
I am using
{exp:imgsizer:size src="{feature_photo}" width="200" height="100" alt="{feature_photo_cutline}" title="{title}" debug="1"}
to call the plugin.
Still not working, but hopefully this will narrow down the problem. I already tried to remove the double “//” in img_rootstep, but that still did not work. Thanks for your persistence in helping to get this working on my site.
I just figured out that $img_rootstep is calling the wrong path. It should call “/usr/www/gm/public_html/ee/images/feature_photos”. Instead it is calling “/usr/local/apache/htdocs//gm/ee/images/feature_photos” I was able to get a resized image hard-coding the path. Is there any way to make the plugin call “/usr/www/gm/public_html/ee/images/VARIABLE_IMAGE_DIRECTORY”? I have limited PHP knowledge, but it seems like it should be pretty simple. This is going to be an invaluable plugin for my site…so glad I’m getting it to work!
I would imagine that {feature_photo} is coming from a https://ellislab.com/asset/images/team-photo/ like variable in your publish page?
the filedir variable is set by your “URL of Upload Directory” in the Control Panel CP Home › Admin › Weblog Administration › File Upload Preferences › Edit File Upload Preferences
the way i have it setup is so the paths are relative to my install of EE
for instance Server Path to Upload Directory = “../images/uploads/” URL of Upload Directory = “images/uploads/”
as you can see in the error output img_rootstep i am appending the input to the src= to the root directory of your htdocs
so “/usr/local/apache/htdocs//gm/ee/images/feature_photos”
would look for the photo at this location after it removes the double slashes
“/usr/local/apache/htdocs/gm/ee/images/feature_photos/secs_state-24414-381_575.jpg”
so try changing your file upload preferences to be Server Path to Upload Directory = “../images/feature_photos/” URL of Upload Directory = “images/feature_photos/”
Hi David (and others!) I’ve just come up against an unusual problem. I had the imgsizer plug-in installed and all was working well. I’ve since made a few changes to my set up, installed CURL on the server and installed the eeFlickr Module. Because of some problems elsewhere I have also cleared the EE cache both via the CP and manually.
Shortly after this I noticed that wherever I was using the imgsizer plugin that nothing was being displayed, no img tag at all. So I added debug=”1” to the params and I get back:
/photo_1.jpg is not readable
This is odd because I have done a sanity check, the image ‘is’ there and even when I hard code the URL I have the same problem. I have even tried turning off caching. I did wonder if I had somehow inadvertently not included GD in the PHP build when I installed CURL but PHP info is reporting it as available (http://wiredin.org.uk/test.php).
Any ideas?
Update Having read back a few posts I see that I’m having the very same problem as others here and will try the latest build with the extra debug info. 😊
Hi David,
I turned the debugging on and have discovered that the img_rootstep is wrong (output below). It should be /something/web/mac/images/alumni/profiles.
I read what you advised for Derek, but that won’t work for me because our images aren’t uploaded to the file upload area. We have a photo gallery set up and then use a relationship field in EE to link to the picture.
Eg:
{related_entries id="profile_img"}
{exp:imgsizer:size src="{image_url}" width="50px" height="50px" alt="{caption}" title="{title}" debug="1"}
{/related_entries}
src = /mac/images/alumni/profiles/Veamatahau_Adrian_72.jpg
img_base = /mac/images/alumni/profiles
img_basename = Veamatahau_Adrian_72.jpg
img_extension = jpg
img_filename = Veamatahau_Adrian_72
img_rootstep = /something/web/alumni//mac/images/alumni/profiles
img_rootpath =
img_fromroot = /Veamatahau_Adrian_72.jpg
/Veamatahau_Adrian_72.jpg is not readable
I was able to solve my problem today. Hopefully this will help some others who were having the same problem.
The first step was to re-assign the DOCUMENT-ROOT in EE’s path.php file. (Thank you mdesign - see post). I added the following to the CONFIGURABLE VARIABLES:
$global_vars =
array(
$_SERVER['DOCUMENT_ROOT'] = '/usr/www/gm/public_html'
);
Because my install is in a subfolder, img_rootstep was then calling:
/usr/www/gm/public_html//gm/ee/images/feature_photos
I needed to remove the “/gm” after “public_html” in order to get the plugin to find the correct path.
Back in pi.imgsizer.php, I had to make a slight adjustment to the code at line 158. I created a new variable from $img_base called $img_base_edit which removed the first 3 characters from the string (/gm). Then, in the following line, I changed $img_base to the new variable $img_base_edit.
$img_base_edit = substr($img_base, 3);
$img_rootstep = $img_rootstep.'/'.$img_base_edit;
Everything seems to be working fine now.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.