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

Erin Dalzell's avatar
Erin Dalzell
790 posts
16 years ago
Erin Dalzell's avatar Erin Dalzell

It doesn’t really say that in the documentation:

Parameters:
src= (required) the path from "webroot" to the image or the URL to the image.
/images/news/moped.jpg or <img src="http://www.lumis.com/images/news/moped.jpg" alt=""  />

But if that is the case…shoot.

Thanks

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
16 years ago
Erin Dalzell's avatar Erin Dalzell

Yup, just looked in the source and you’re right, it is for local images only. Dang nabbit.

       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

noregt, glad you solved your problem.

       
noregt's avatar
noregt
360 posts
16 years ago
noregt's avatar noregt

ImpGabe, thanks for your help. Can’t help but wonder how the situation is with this plugin. I did notice some contradictions in the latest version…

       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

Yeah, I’m not sure what happened either. But it seems to me like the documentation just wasn’t updated. Looking back through the forum it also seems like enough people wanted to be able to do cropped rectangular thumbs that Lumis changed the default behavior to do this. If I understand what you want correctly, you want it to size images down to the wdith and height you assign. Is this correct? Wouldn’t this create distortions if clients uploaded a landscape image that was resized to fit portrait dimensions?

I generally use this in conjunction with Multibox or Lightbox and make a cropped thumbnail that users can click on to see the original version (which has been sized appropriately by the EE upload location setting).

Oh and to solve the issue of EE putting the width and height in the settings, if you use MH File upload you can use the Tag Pair for that and just get the file_url to put in image sizer and make it whatever size you want.

       
noregt's avatar
noregt
360 posts
16 years ago
noregt's avatar noregt
Wouldn’t this create distortions if clients uploaded a landscape image that was resized to fit portrait dimensions?

No, it sizes the other side proportionally as you can see in the test page, so that is just fine, but thanks

       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

Isn’t that the same as just defining either the width or the height?

       
noregt's avatar
noregt
360 posts
16 years ago
noregt's avatar noregt

No, if you assign width AND Height, it behaves like most image resizers; if it is a portrait image it will not be higher then the max height. if it is a landscape image, it will not be wider then the set width. This is great if you have a fixed box to display the image in. If you would only have a max width,the height could be a problem with a portrait image.

In this case, I decided to go for auto.

       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

So are you doing something like this:

{exp:imgsizer:size src="{news_image}" auto="100" alt="Image for {title}"}

Or is your image placeholder not equal dimensions?

Sorry about asking so much. I just want to see if I’m missing something that I could possible use someday.

       
noregt's avatar
noregt
360 posts
16 years ago
noregt's avatar noregt

I’m using

{exp:imgsizer:size src={bestand} auto="300"}
       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

Does this not work in the latest version of Image Sizer?

       
noregt's avatar
noregt
360 posts
16 years ago
noregt's avatar noregt

Not with the EE file upload, where height and width attributes are added during file upload (as it should).

       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

Ah, so you are using the good old EE file upload. Is there a reason you’re not using the Mark Hout file extension? http://docs.markhuot.com/ee/extensions/file

This would take care of that issue, plus make it easier for users to upload images.

       
noregt's avatar
noregt
360 posts
16 years ago
noregt's avatar noregt

Well, I try to not use too many extensions and plugins, because I’ve run into trouble with a lot of them during upgrades. Lately I’ve had to dump TinyMCE and Textile to name a few.

But I can give it a try.

       
ImpGabe's avatar
ImpGabe
171 posts
16 years ago
ImpGabe's avatar ImpGabe

I think you’ll find that as far as extensions goes, this one is a staple. This should have been how EE did uploads to begin with.

Let me know if you need to see any code. I’ve used this extension with many image apps, lightboxes, slideshows, etc… Unfortunately it’s another extension that if you want full instructions you have to dig through pages of the forum. But one of the best things about it is the ability to just get the file path from the entry, so you can set your own attributes.

I will say however that the big downfall of this extension is the inability to add captions when doing multiple uploads. The workaround is a pain and involves figuring out a maximum number of image uploads per entry and creating a field for image and a field for caption for each one.

       
First 24 25 26 27 28 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.