We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

plugin: Image Sizer

Development and Programming

International Polar Foundation's avatar
International Polar Foundation
14 posts
16 years ago
International Polar Foundation's avatar International Polar Foundation

AWSOME. Works like a charm now. Thanks for this !

       
EliVZ's avatar
EliVZ
37 posts
16 years ago
EliVZ's avatar EliVZ

Hi, I am trying the new 2.5.4 version of Image Sizer, and having a problem. It is only caching the first image out of each folder. So, for instance, I am using it for a staff directory and I just get one headshot (the first one I view) for everyone. It is caching the images without a file name–”-120x180.jpg”–which I assume is the problem.

It works perfectly with version 2.1. Any idea what the problem could be? I tried setting the base_cache manually, with no effect.

My template debugging output, if it helps:

(0.145299)      Tag: {exp:imgsizer:size src="http://www.domain.com/assets/headshots/name.gif" width="198"}
(0.146223)      No Closing Tag
(0.146374)      Processing Tags
(0.146443)      Plugin Tag: Imgsizer/size
(0.146474)      Including Files for Tag and Modules
(0.150382)      Beginning Final Tag Data Processing
(0.150437)      Calling Class/Method: Imgsizer/size
(0.150657)       -> Class Called: Imgsizer
(0.150823)       -> Method Called: size
(0.150934)      <img src="http://www.domain.com/assets/headshots/name.gif" alt=""  />
(0.150988)      /var/www/html/domain/
(0.151063)      urlarray path //assets/headshots/name.gif
(0.152092)       -> Data Returned
(0.152208)       - End Tag Processing -
       
lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

can i assume that every image you are putting in the src= is not that name.gif is actually different for every one?

if so can you post the actually debugging output with the name.gif the way the debug outputs it.. if you want you can pm me that info if it is sensitive.

       
EliVZ's avatar
EliVZ
37 posts
16 years ago
EliVZ's avatar EliVZ

Sorry, should have clarified: all instances of “name.gif” are the actual file name. That is, the one that I am passing to Image Sizer, not the image that is actually displayed. I will also pm you the actual output in a second.

Edit: It looks like your mailbox is full & I can’t PM you.

       
lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

woops sorry give it a try now

       
Adam Khan's avatar
Adam Khan
315 posts
16 years ago
Adam Khan's avatar Adam Khan

v2.5.4, cross-MSM imagesizer, Lumis, you are my new KING.

Got a Donations box?

       
Adam Khan's avatar
Adam Khan
315 posts
16 years ago
Adam Khan's avatar Adam Khan

I’m having the same problem as EliVZ running 2.5.4 – the sized images’ filenames are all the same when sized to the same dimensions, eg, “-940x270.jpg”, with nothing before the dimensions in the filename.

       
Danny T.'s avatar
Danny T.
426 posts
16 years ago
Danny T.'s avatar Danny T.

Lumis (David),

I changed the base path, but I still noticed it appended a /images/uploads suffix into my designated cache folder and was wondering if it’s possible to change that? I know it’s by design and is likely based on the information from the upload directory it uses, but just curious. I was hoping it would go directly into the folder I specified rather than creating a few more subfolders. It’s not a big deal, but just wanted to know.

And might I say, thanks for the contribution after such a long period! =)

       
lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

@Adam I am working with EliVZ to find out what that problem is. However any help or information you can provide would be cool, can you PM me your template debug output and php version? I have a idea of what it is but i want to be sure.

@Danny, I did it that way so there are no file-name collisions. if the cache folder was one big folder and you had your originals like this

/images/uploads/sunset.jpg and /images/member_uploads/sunset.jpg

when the plug-in re-sized them and put them all in one folder the most recently re-sized version would overwrite the older one if they are set to the same sizing.

The other option i did not do and it may really be a better option. Would be to md5 hash the image name and path and create the cached image from that. the downfall to that is the image names would be ugly and not very friendly for things like “seo - google images etc.”

       
Adam Khan's avatar
Adam Khan
315 posts
16 years ago
Adam Khan's avatar Adam Khan
The benefit for setting base_path yourself is that you could use this with cache_path to fetch images outside of your web-root and then cache them into your web-root. e.g. if you had multiple domains and wanted to share a single image repository across domains.

That’s precisely what I’m trying to do. Can you explain further? Do I need to do anything special in imagesizer for the site where the originals are? And in the other site where I’m retrieving them, do I need both the base_path and cache_path parameters?

       
lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

ok give version 2.5.5 a try (Thanks all for sending your debug info)

also added 2 remote fetch options remote_user= (optional) use if the remote server requires a username and password. remote_pass= (optional) use if the remote server requires a username and password.

@Adam I have some work to take care of now i will try and get you an example a bit latter.

       
Danny T.'s avatar
Danny T.
426 posts
16 years ago
Danny T.'s avatar Danny T.

A less technical question: What is the ideal permissions I should be setting for the cache folder? I have it set to 777, but it leaves my stomach with butterflies - unless that’s standard. It was giving me a bit of issues at 755.

       
Adam Khan's avatar
Adam Khan
315 posts
16 years ago
Adam Khan's avatar Adam Khan
ok give version 2.5.5 a try (Thanks all for sending your debug info) also added 2 remote fetch options remote_user= (optional) use if the remote server requires a username and password. remote_pass= (optional) use if the remote server requires a username and password. @Adam I have some work to take care of now i will try and get you an example a bit latter.

Excellent stuff, works for me! Look forward to your explanation of the cross-site method.

Thank you again.

       
sherrills's avatar
sherrills
26 posts
16 years ago
sherrills's avatar sherrills

Anyone out there been able to get imgsizer to work with “Stand-Alone Image Editor” from PutYourLightsOut? I’ve been racking my brain trying get them to work together. There must be a way! Any help would be greatly appreciated.

       
Adam Khan's avatar
Adam Khan
315 posts
16 years ago
Adam Khan's avatar Adam Khan
The benefit for setting base_path yourself is that you could use this with cache_path to fetch images outside of your web-root and then cache them into your web-root. e.g. if you had multiple domains and wanted to share a single image repository across domains.
That’s precisely what I’m trying to do. Can you explain further?

Figured it out as much as I needed to. Since my two sites are on the same server, I see that I don’t need the base_cache parameter, only the base_path when calling from the site where the images are not located. Then, in that imagesizer tag’s src, I just precede the {sized} variable with the domain name of the site where the images are located. Great!

       
First 27 28 29 30 31 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.