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

Brainwrek's avatar
Brainwrek
75 posts
15 years ago
Brainwrek's avatar Brainwrek

Hey all…

Can Image Sizer save the created thumbs to Amazon S3?

I’m wanting to use Stephen Lewis’s Bucketlist add-on to upload images to Amazon S3, and Image Sizer to create thumbs on the fly. Buuuuuuut…. If I understand correctly, this setup would work ok, but the thumbs would still be on the local server instead of on the S3 cloud. And for scalability, I’d really like the original pics AND resized thumbs to be served from Amazon.

Hence the question… Can Image Sizer save the created thumbs to Amazon S3? And if not, does anyone know how tough it would be to make that happen?

Thanks

       
AJP's avatar
AJP
311 posts
15 years ago
AJP's avatar AJP

Running into an issue with Amazon S3. Remote folders are getting stored as % 2 F in the file name. And imgsize can’t parse that. Probably because it’s looking for a folder in the file structure.

Thoughts?

       
AJP's avatar
AJP
311 posts
15 years ago
AJP's avatar AJP
Hey all… Can Image Sizer save the created thumbs to Amazon S3? I’m wanting to use Stephen Lewis’s Bucketlist add-on to upload images to Amazon S3, and Image Sizer to create thumbs on the fly. Buuuuuuut…. If I understand correctly, this setup would work ok, but the thumbs would still be on the local server instead of on the S3 cloud. And for scalability, I’d really like the original pics AND resized thumbs to be served from Amazon. Hence the question… Can Image Sizer save the created thumbs to Amazon S3? And if not, does anyone know how tough it would be to make that happen? Thanks

You can use the remote=”on” parameter, but the issue I’m having with Amazon S3 + imgsizer, is that you can’t have any “folders” in your bucket path.

       
AJP's avatar
AJP
311 posts
15 years ago
AJP's avatar AJP

To fix my bucketlist issue of not being able to parse files with directories, while using the remote parameter, search for line 670

$save_name = $img['url_host_cache_dir'].$save_mask."-".$url_filename['basename'];

add this line right below (671)

$save_name = str_replace('/', '_', $save_name);
       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
15 years ago
Sean C. Smith's avatar Sean C. Smith

First off, thank you for a great plugin.

I was wondering if it would be possible to set the crop location to top left rather than from the center?

       
togs's avatar
togs
9 posts
15 years ago
togs's avatar togs

hello All, I’m receving a server error when running imgsizer to resize some photos.

There error I get is:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 9000 bytes) in /home/ethesch4/public_html/mysite.com/panel/expressionengine/third_party/imgsizer/pi.imgsizer.php on line 555

The {articles-and-media-image-width} is pulled from a field the channel entry. Essentially, I want the photos on the individual article pages to have different sized photos but default to 250 pixels when no value is set. All the article pages are working fine, but the one that is left empty, which would assume the photo is 250 pixels using the conditional below generates the error from above.

Any ideas?

{if articles-and-media-image-width != ""}
  {exp:imgsizer:size src="{articles-and-media-image}" width="{articles-and-media-image-width}"}
    <span class="framedPic">
      {sized}</span>
  {/exp:imgsizer:size}
{if:else}
  {exp:imgsizer:size src="{articles-and-media-image}" width="250"}
    <span class="framedPic">
      {sized}</span>
  {/exp:imgsizer:size}
{/if}
       
davehenderson's avatar
davehenderson
36 posts
15 years ago
davehenderson's avatar davehenderson

Hi All,

Having an issue with this plugin when working it into the conditional below:

{exp:query sql="SELECT username, member_id, screen_name, bio, sig_img_filename, photo_filename FROM exp_members ORDER BY RAND() LIMIT 1"}

{exp:member:custom_profile_data member_id="{member_id}"}

{if photo_filename}
{exp:imgsizer:size image="/images/member_photos/{photo_filename}" width="196" height="160"}

{if:else}
{exp:imgsizer:size image="/images/member_photos/noprofileimage.png" width="196" height="160"}                     
        
{/if}

{/exp:member:custom_profile_data}
{/exp:query}

When the webpage returns the if:else the correct image loads and places fine but I also get an error in the header:

A PHP Error was encountered Severity: Notice Message: getimagesize() [function.getimagesize]: Read error! Filename: plugins/pi.imgsizer.php Line Number: 151

Has anyone had a similar issue or know what may be causing this?

Cheers Dave

       
bigmikestudios's avatar
bigmikestudios
22 posts
15 years ago
bigmikestudios's avatar bigmikestudios

I found I had a project that needed me to specify the maximum width and height to use without cropping, so that the image would resize proportionally to fit within the dimensions.

To do that, I hacked the plugin as follows:

I added the a “shrink” parameter at around line 373:

$shrink = ( ! $TMPL->fetch_param('shrink')) ? '' : $TMPL->fetch_param('shrink');

And I stuck new code for shrinking and the existing cropping code into an if statement that depended on the value of the new shrink parameter at around line 424:

// -------------------------------------
// shrink if we shouldn't crop.
// -------------------------------------
if ($shrink=="yes") {
    //pick which ratio to use
    $my_ratio = ($x_ratio < $y_ratio) ? $x_ratio : $y_ratio;
    
    $img['out_width'] = ceil($my_ratio * $width);
    $img['out_height'] = ceil($my_ratio * $height);
}
else
{
    // -------------------------------------
    // Do we want to Crop the image?
    // -------------------------------------
    if($max_height != '9000' && $max_width != '9000' && $max_width != $max_height)
    {
        $img['crop'] = "yes";
        $img['proportional'] = false;
        $img['out_width'] = $max_width;
        $img['out_height'] = $max_height;
    }

    // -------------------------------------
    // Do we Need to crop?
    // -------------------------------------
    if($max_width == $max_height && $auto == ""){
        $img['crop'] = "yes";
        $img['proportional'] = false;
        $img['out_width'] = $max_width;
        $img['out_height'] = $max_height; 
    }    
}

I love this plugin, and have used it on every EE site I’ve done for years. Thanks for writing it!

       
sbeyatte's avatar
sbeyatte
18 posts
15 years ago
sbeyatte's avatar sbeyatte

Has anyone found a solution for the blank plug-in manager screen when installing most recent imgsizer?

Is there any way someone could post a link to v2.5.5? or whichever one makes it work?

Great plug-in btw! Thanks a million for it, my hero….

****EDIT****

problem solved: was running php4, who knew that media temple would run php4 by default…. anyways, works now!

       
bmovie's avatar
bmovie
619 posts
15 years ago
bmovie's avatar bmovie

-remove-

       
11Media's avatar
11Media
157 posts
15 years ago
11Media's avatar 11Media

Hi,

I’ve discovered a small issue with the plugin.

If the image is smaller than the set width or height - the image gets stretched to fill those dimensions… Not too good!

Can you create a new parameter to cater for the above problem?

e.g. Something like max width & height?

       
Shandy's avatar
Shandy
1 posts
15 years ago
Shandy's avatar Shandy

I was also having problems with imageSizer 2.5.6 and the path settings when EE is installed in a sub-directory. This was the suggestion from my host with regards to the correct setting of $base_path by imageSizer:

$_SERVER[‘DOCUMENT_ROOT’] is probably not the proper way to go, because you aren’t always guaranteed to install it in the document root, as you have found. This is really no different than if the site was example.com/news/index.php with EE installed in a news directory. I would suggest submitting a bug report with the plugin author, and until a solution is found that does not require the $_SERVER[‘DOCUMENT_ROOT’] variable, consider: PATH_THEMES.’../images/’ or perhaps: PATH.’../images/’ if your system directory resides at the same level as the main ‘images’ folder.
       
Ryan Blaind's avatar
Ryan Blaind
168 posts
15 years ago
Ryan Blaind's avatar Ryan Blaind

Is this the right place for a feature request?

I was thinking it would be really handy if you could do something like this:

Currently if you specify both the width/height parameters like this:

if you use both width and height the image will be cropped from center to that width and height.
if "width" is = to "height" the image will be cropped from image center to make a square sized image.

But it would be handy if you could add another parameter like

crop="top|center|bottom"

or something like that so you could specify where in the image you want the crop to be handled so that it isn’t always in the center.

Anyways, take it for what it’s worth, I could just really use this parameter right now (:

cheers, and thanks for a great plugin.

       
Helmi_xisnet's avatar
Helmi_xisnet
71 posts
15 years ago
Helmi_xisnet's avatar Helmi_xisnet

I’m trying to use the remote feature; but if the source image file name contains space, imgsizer will not render the image. Is this a bug?

       
Jim Pannell's avatar
Jim Pannell
187 posts
15 years ago
Jim Pannell's avatar Jim Pannell

Any ideas why imgsizer sometimes throws a blank where it should output the img tag? I can see that the cached image has been created, but isn’t being output in the template.

       
First 46 47 48 49 50 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.