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

Ian Ebden's avatar
Ian Ebden
312 posts
15 years ago
Ian Ebden's avatar Ian Ebden

I’ve used this excellent plugin a few times before but it’s not playing nice on a new site I’m developing. Host installed GD this morning so I know it’s not that. I’ve created the “sized” folder inside images with 755 permissions. The imgsizer code just displays nothing in my templates. When I debug I get the following…

imgsizer.Error: /usr/local/apache/htdocs/~username/images/image-name.jpg image is not readable or does not exist

I’m working on a dev server viewable at an IP address for now until domain transfers. Could this be throwing it?

Any help much appreciated.

       
Ian Ebden's avatar
Ian Ebden
312 posts
15 years ago
Ian Ebden's avatar Ian Ebden

Okay, been playing all morning and still no luck but…

  • Not getting any errors; just no imgsizer tag output at all. No errors means I can’t debug either
  • If I hardcode
/path/to/my/image/image.jpg

it displays fine but won’t in {imgsizer} tags

It’s got to be a paths issue. Using an IP address for now until domain transfers, but address includes a tilde. Read somewhere this might cause some grief. Can anyone help me figure this out?

       
Ryan 2010's avatar
Ryan 2010
265 posts
15 years ago
Ryan 2010's avatar Ryan 2010

I’m still running into memory allocation errors when uploading images around 4mb. In PHP Info, memory limit is set at -1. The server has 512megs of ram.

Here’s the error:

“Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16000 bytes) in /home/site/public_html/system/plugins/pi.imgsizer.php on line 545”

Is it possible that imgsizer has it’s own cap of 64megs? I see this in the plugin file:

@ini_set("memory_limit","12M");
            @ini_set("memory_limit","16M");
            @ini_set("memory_limit","32M");
            @ini_set("memory_limit","64M");
       
Ian Ebden's avatar
Ian Ebden
312 posts
15 years ago
Ian Ebden's avatar Ian Ebden

Okay, just replying to my own post here, but seems I’ve fixed things and wanted to share in case anyone else encountering similar probs.

As I thought, this was a paths issue. I may be wrong but imgsizer doesn’t seem to like the tilde in URLs. So… I registered a new domain and pointed it to my dev server so the site resolves to a tidy URL. In System > Prefs I changed my “URL to the root directory of your site” to my new URL, and changed my file upload preferences “URL of Upload Directory” to the new URL. Bingo.

I’m not 100% on why this works but it does. If anyone can explain better than me, by all means go ahead.

BTW - almost goes without saying but great plugin!

       
FortySeven Media's avatar
FortySeven Media
130 posts
15 years ago
FortySeven Media's avatar FortySeven Media

I’m trying to use ImgSizer on my built-in OS X webserver. By using the base_path and base_cache overrides I’ve gotten almost everything working, but the browser_out_path keeps going to the root of my server.

So for instance, the site lives in http://my-computer.local/~user/sitename/ but the browser_out_path keeps trying to pull the images from http://my-computer.local/~user/

Looking at the template debugging, this is the only path not rendering correctly; I even have outlines of the images at their correct size so I know the rest of the tag is parsing properly.

I’ve attempting modifying the browser_out_path on line 263 but it doesn’t seem to be affecting anything at all. Has anyone else had issues running ImgSizer on their local OS X webserver? Help me, please!

       
mrpiano's avatar
mrpiano
85 posts
15 years ago
mrpiano's avatar mrpiano

Sorry I am reading through these posts and it looks like there are a few threads that describe my problem but I haven’t seen the resolution…apologies if I missed it.

I am posting photos to a weblog called “galleries.”

{exp:weblog:entries weblog="galleries" orderby="date" sort="desc" limit="15"}

{exp:imgsizer:size src="{large}" width="200" alt="My Title" id="img_5334" class="entry_img"}

{/exp:weblog:entries}

I have a custom field called “large” which contains the URL to my large images. There are in http://www.mysite.com/images/uploads/full/

I’m trying to pull the URL from my custom field and create a thumbnail that will link to the large image.

At this point, the code above gives me a blank page.

Could anyone advise? Once again, sorry if I missed the resolution. By the way, I’m using v.2.1. V 2.5.6 doesn’t seem to be working on a fresh install of EE?

GG

       
Joobs's avatar
Joobs
362 posts
15 years ago
Joobs's avatar Joobs

I recently noticed the ImgSizer is putting a black pixel in the top left of all my resized images. Anyone else getting this or know what is causing it?

Using the latest version.

       
Clearpeak's avatar
Clearpeak
413 posts
15 years ago
Clearpeak's avatar Clearpeak

Hi Lumis,

I just moved my site over to a new server and now I’m getting the following error at the top of those pages that use imgsizer. All my image directories are set to 777. Any idea what’s going on?

Thanks

Warning: imagejpeg() [function.imagejpeg]: Unable to open ‘/xxx/xxx/public_html/uploads/images/inventory/cache/Picture2-0x180.jpg’ for writing: Permission denied in /xxx/xxx/public_html/stylesys/plugins/pi.imgsizer.php on line 608

       
GDmac - expocom's avatar
GDmac - expocom
350 posts
15 years ago
GDmac - expocom's avatar GDmac - expocom

If you moved to a new server, did you get a new path to your webroot / home-directory? Check your file-upload directories paths and other paths in the control panel empty the cache-directories (or move/park them somewhere in an archive) did you also update imgsizer during server-move (because some cache things changed in imgsizer 2.5)

       
Clearpeak's avatar
Clearpeak
413 posts
15 years ago
Clearpeak's avatar Clearpeak

Looks like I just needed to clear the cache.

Thanks

       
zamson's avatar
zamson
5 posts
15 years ago
zamson's avatar zamson

I’m having a quite annoying problem with this plugin.

Images get generated and in the debug is clearly shows it’s fetching the image specified in my weblog (I can see resized image in the sized folder on the FTP). Problem is, image sizer outputs blank code to the page. Any ideas?

Code used in the template (image sizer part):

<div class="deals_logotype">
{exp:imgsizer:size src="{deals_logo}" height="50" alt="{title}"} { /exp:imgsizer:size }
</div>

The plugin finds the pic from the weblog and resizes it but does not display the the image.

Please advice.

EDIT: Got it working, Removed the closing tag and suddenly it worked 😊 Now I can sleep without nightmares 😛

       
Blue Coast Web's avatar
Blue Coast Web
32 posts
15 years ago
Blue Coast Web's avatar Blue Coast Web

Has anyone been able to integrate a watermarking script with this plugin?

       
Joobs's avatar
Joobs
362 posts
15 years ago
Joobs's avatar Joobs

Is anyone getting a black pixel in the top left corner of sized images?

I’m getting it specifically when I am specifying a width of my image but no height. I am not getting it when with cropped imaged (where i’ve specified both a height and width)

Has anyone been able to integrate a watermarking script with this plugin?

phpThumb can do this

       
aircrash's avatar
aircrash
293 posts
15 years ago
aircrash's avatar aircrash

is there a way to get multiple sizes within the imgsizer tag pair? I’m setting up a gallery of images where most images will be 100 x 100, but a few are 220 x 220, based on the count variable.

The code I’m using now just sizes every image to 220 and then the img tag specifies the 100 x 100 where necessary, but I’d rather not load a bunch of images that are larger than necessary, if i can avoid it.

Here’s my current code:

<li>
{exp:imgsizer:size src="{art-image}" width="220" height="220"}
{if count == 1}{sized}
{if:else}{sized}{/if}
{/exp:imgsizer:size}
</li>

Is there a way I can use the count conditional within (or around) the imgzer tag to get the different sized images?

       
Joobs's avatar
Joobs
362 posts
15 years ago
Joobs's avatar Joobs

use the modulus (%) php operator to change the values for every X number of entries.

You could also try this new plugin http://ellislab.com/forums/viewthread/132133

Or maybe even the switch tag for weblog entries loop?

       
First 37 38 39 40 41 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.