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

MarcinM's avatar
MarcinM
17 posts
16 years ago
MarcinM's avatar MarcinM

I found what is wrong, bus still don’t know why.

For now it looks like that work for me: comment line 449 in pi.imgsizer.php

//$img['browser_out_path'] = $FNS->remove_double_slashes("/".str_replace($img['base_path'], '', $img['root_out_name']));

and put just this one there:

$img['browser_out_path'] = $img['root_out_name'];

Now the path is correct and the small size pics shows correctly.

Bug?

       
jtree's avatar
jtree
255 posts
16 years ago
jtree's avatar jtree

I’m running EE 1.6.7 build 20090320 and using Image Sizer 2.1 (Image Sizer 2.5.6 won’t work at all). When I’m using the plugin jpg and png files show up fine, but gifs don’t work at all. Has anyone else had this issue? What did you do to fix it? Thanks!

       
goodcompany's avatar
goodcompany
51 posts
16 years ago
goodcompany's avatar goodcompany

I’ve read through all 27 pages, and although I came across two or three others asking the same question, I never located an answer - might have just missed it…

Is there a way to test the width and height of the original uploaded image so that it’s proportions can be determined, and then perform different image sizer operations accordingly?

In many cases you need to handle the sizing differently depending on if the original image is portrait or landscape oriented.

P.S. One of the best EE plug-ins available, truly a must have. Thanks again.

       
stefanmve's avatar
stefanmve
1 posts
16 years ago
stefanmve's avatar stefanmve

Hello, I am having a problem with Image Sizer. I installed my ee into a subdir like this www.domain.com/v2/, the original images are at www.domain.com/v2/images/gallery/ and I want the sized images to be at www.domain.com/v2/images/gallery/images/sized/ but Image Sizer wants to use www.domain.com/images/sized/v2/images/gallery.

I tried using the parameters base_path or base_cache, but the tag is not rendered at all in the template when I use either of them.

       
goodcompany's avatar
goodcompany
51 posts
16 years ago
goodcompany's avatar goodcompany

Odd this question never seems to get answered 😊 , or if it has that I can’t seem to find it. Seems pretty fundamental to me, so it’s either so obvious that it’s not worth answering, or it’s not as common a need as I’d perceive it to be.

Basically, I just want to know what the width and height of the originally uploaded image are, and then execute different image sizer operations based on that knowledge.

Using the example of an image being displayed within a lightbox, applying “height=400” works great for portrait and square images, it keeps the images viewable for most users running at a resolution of 1024 - it also works great for a large number of landscape images, …until it doesn’t.

Landscape images over a certain width become WAY to broad when sized vertically to 400. So I need to test for images of a certain aspect ratio, and give those image sizer operations a width instead of height to work with. Make sense?

Godspeed.

I’ve read through all 27 pages, and although I came across two or three others asking the same question, I never located an answer - might have just missed it… Is there a way to test the width and height of the *original* uploaded image so that it’s proportions can be determined, and then perform different image sizer operations accordingly? In many cases you need to handle the sizing differently depending on if the original image is portrait or landscape oriented. P.S. One of the best EE plug-ins available, truly a must have. Thanks again.
       
ms's avatar
ms
274 posts
16 years ago
ms's avatar ms
Odd this question never seems to get answered 😊 , or if it has that I can’t seem to find it. Seems pretty fundamental to me, so it’s either so obvious that it’s not worth answering, or it’s not as common a need as I’d perceive it to be. Basically, I just want to know what the width and height of the originally uploaded image are, and then execute different image sizer operations based on that knowledge.

Goodcompany … honestly, I’m not totally sure if I really understand your question, it seems totally unrelated to Image Sizer for me - so apologies if this is not what you’re looking for. But if your question is: “How can I get the height and width of an uploaded image to use it in conditionals?”, then either this add-on might help (I never used it myself) or you could use a few lines of PHP utilizing the getimagesize function.

HTH -Markus

       
goodcompany's avatar
goodcompany
51 posts
16 years ago
goodcompany's avatar goodcompany

Sorry, I think you’re right, ms. I lost the forrest through the trees. But thanks a ton for chiming in, and for introducing me to size plus plugin. It’s exactly what I need to make it work.

       
steve.sweetland's avatar
steve.sweetland
35 posts
16 years ago
steve.sweetland's avatar steve.sweetland

Im completely shtuck!

Iv installed the plugin, as iv done plenty of times before, but its not creating the cached image!!

I dont know WHATS going on… but this is the debugging im getting.

it looks like the url path is being sent html encoded parameters…

(0.090811)      Parsing Tags in Template
(0.090835)      Tag: {exp:imgsizer:size src="/images/home/pic1.jpg" width="230"}
(0.090922)      No Closing Tag
(0.090974)      Tag: {exp:imgsizer:size src="" width="230"}
(0.091045)      No Closing Tag
(0.091091)      Tag: {exp:imgsizer:size src="/images/home/pic2.jpg" width="230"}
(0.091170)      No Closing Tag
(0.091209)      Processing Tags
(0.091236)      Plugin Tag: Imgsizer/size
(0.091256)      Plugin Tag: Imgsizer/size
(0.091275)      Plugin Tag: Imgsizer/size
(0.091292)      Including Files for Tag and Modules
(0.093475)      Beginning Final Tag Data Processing
(0.093495)      Calling Class/Method: Imgsizer/size
(0.093570)       -> Class Called: Imgsizer
(0.093591)       -> Method Called: size
(0.119659)       -> Data Returned
(0.119703)      Calling Class/Method: Imgsizer/size
(0.119792)       -> Class Called: Imgsizer
(0.119814)       -> Method Called: size
(0.119872)      Returning No Results Content
(0.119888)       -> Data Returned
(0.119916)      Calling Class/Method: Imgsizer/size
(0.119975)       -> Class Called: Imgsizer
(0.119993)       -> Method Called: size
(0.152242)       -> Data Returned
(0.152296)       - End Tag Processing -

even tho, my tag says

{exp:imgsizer:size src="/images/home/pic1.jpg" width="230"}
       
steve.sweetland's avatar
steve.sweetland
35 posts
16 years ago
steve.sweetland's avatar steve.sweetland

Solved.

Looks like the plugin debugging just refused to work!

Did some manual debugging (print statements ftw!), and managed to get it nailed down to some really odd permissions issues.

       
pirco's avatar
pirco
218 posts
16 years ago
pirco's avatar pirco

I’m trying real hard but my thumbnails keep getting squished….

{exp:imgsizer:size src="{photo}" width="90" height="90"}{photo}{/exp:imgsizer:size}

…resizes fine but squeezes my landscape-oriented photos horizontally.

am I doing it wrong?

thanks.

       
evasion's avatar
evasion
58 posts
16 years ago
evasion's avatar evasion

You should use the auto parameters :

{exp:imgsizer:size image="{photo}" auto="90" alt="Thumb"}{/exp:imgsizer:size}
       
Frychiko's avatar
Frychiko
79 posts
16 years ago
Frychiko's avatar Frychiko

Is there a simple step-by-step, or complete example somewhere? Or some kind of admin config I have to set up?

1st example from the doc (I’ve changed the file name to one on my server):

{exp:imgsizer:size src="/images/news/moped.jpg" width="200" alt="My Title" id="img_5334" class="entry_img"}

Results in nothing output to HTML. Do I have to set permissions for some directory?

       
Frychiko's avatar
Frychiko
79 posts
16 years ago
Frychiko's avatar Frychiko

Ah okay, as I suspected, you have to create a “sized” directory and then chmod 777 and chown it.

Working now..

       
joninnz's avatar
joninnz
6 posts
16 years ago
joninnz's avatar joninnz

I’ve tried using this plugin but I keep getting an error on my local machine.

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 36000 bytes) in D:\sites\EECore\system\plugins\pi.imgsizer.php on line 554

Any suggestions?

cheers

       
joninnz's avatar
joninnz
6 posts
16 years ago
joninnz's avatar joninnz

Woops! - no width or height was set on the tag so resulted in that error.

       
First 31 32 33 34 35 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.