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

Mike Verbruggen's avatar
Mike Verbruggen
37 posts
15 years ago
Mike Verbruggen's avatar Mike Verbruggen
Maybe being able to specify by corner, and when not specified, it will default to middle?
{exp:imgsizer:size image="{image}" width="322" height="197" alt="{caption}" corner="top-left"}
or
{exp:imgsizer:size image="{image}" width="322" height="197" alt="{caption}" corner="bottom-right"}
Hmm.. Maybe i will look into it later, i personally don’t see the use at this moment, but if i have the time.

Just like david I’m looking for a option to get more control over the resizing process.

I want to make a webdesign portfolio with an overview and a detail page. The image on the overview page will be 600px x 300px (for example). while the image on the detail page will be 600px x 600px. With the current version of imgsizer the image on the overview page will look like it was cropped without care. What i want in this situation is an option to tell the imgsizer “stick to the top of the image”. The result will be a top view of a screendump. This will look better than a middle part of a screendump.

I hope there is time to make this powerful add-on more powerful.

An example what will be a ultimate solution.

Corner control

{exp:imgsizer:size image="{image}" width="322" height="197" alt="{caption}" left="0" bottom="20"}

or

{exp:imgsizer:size image="{image}" width="322" height="197" alt="{caption}" right="0" top="0"}

or

{exp:imgsizer:size image="{image}" width="322" height="197" alt="{caption}" left="10" top="10"}

Side control

{exp:imgsizer:size image="{image}" width="322" height="197" alt="{caption}" left="0"}

or

{exp:imgsizer:size image="{image}" width="322" height="197" alt="{caption}" bottom="10"}
       
angstmann's avatar
angstmann
225 posts
15 years ago
angstmann's avatar angstmann

Completely agree with you on that. I have experienced some less than ideal crops whilst using this plugin, but I feel the same would happen with other plugins that do similar things. It would be great if there was other ways of controlling how an image gets cropped, but when there is a level of automation involved, combined with the potential of source images being of all diffeent shapes, sizes and zoom levels etc, I think we can’t expect a perfect solution.

       
NKT com's avatar
NKT com
124 posts
15 years ago
NKT com's avatar NKT com
I’d think that the {image_file} variable contains “/images/sized/images/sized/remote/images-mysite-org-global-video-who_is_test_file-200x140.jpg”. It probably doesn’t have anything to do with the imgsizer plugin. To check, place {image_file} on it’s own not in the imgsizer plugin so that it echoes on the page. That way you can see what values are being passed to imagesizer. If the {image_file} variable is “/images/sized/remote/images-mysite-org-global-video-who_is_test_file-200x140.jpg” then there’s your problem. Imgsizer automatically adds /images/sized to the base_path. In this case /remote/.

I’m using using the nGen File Field extension for the {image_file}. The varible it outputs is…

/global/who_is_test_file.jpg

I then use this code for image sizer…

{exp:imgsizer:size src="http://images.westernshugdensociety.org{image_file}" remote="on" width="190" alt="{image_des}" title="{title}"}

and end up with this file path…

/images/sized/images/sized/remote/images-mysite-org-global-video-who_is_test_file-200x140.jpg
       
NKT com's avatar
NKT com
124 posts
15 years ago
NKT com's avatar NKT com

Is it possible to set an images directory outside the web root folder? I’m using the remote parameter at the moment but my image files are just in another directory. Perhaps this would solve my long file path issues.

       
the_crimsonrooster's avatar
the_crimsonrooster
264 posts
15 years ago
the_crimsonrooster's avatar the_crimsonrooster

fyi…

the Lumis site is down..

       
james Brown's avatar
james Brown
492 posts
15 years ago
james Brown's avatar james Brown

I’m getting an error when I run the plugin:

Notice: Undefined index: url_src in /nfs/c04/h01/mnt/59063/domains/skateparksystems.com/html/system/plugins/pi.imgsizer.php on line 130

The code I am using is:

{exp:imgsizer:size image=

The strange thing is, it was working fine, then I refreshed the page and I get the error at the top of the page. Actually I get it 10 times repeated.

       
okayyellow's avatar
okayyellow
16 posts
15 years ago
okayyellow's avatar okayyellow

Ive read through this entire thread and seen a few other post this but no answer that i can tell.

Is there anyway to get the image sizer to output the full url instead of the relative path. For example…

fyi - {image} outputs the full url -

So This:

{exp:imgsizer:size width="185" height="110" src="{image}"}

currently outputs this:

/images/uploads/cache/image-185x110.jpg

and I would rather it be:

http://www.mysite.com/images/uploads/cache/image-185x110.jpg

This is causing problems when I use multiple site manager, because the cache folder is located on another server. This would also be helpful for my rss feed which also uses image resizer. When i go to validate it, it recommends to use the full path.

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

@okayyellow

try this

{exp:imgsizer:size width="185" height="110" src="{image}" server_domain="http://www.mysite.com/"}

undocumented but it basically appends the domain to the image path on output.

       
james Brown's avatar
james Brown
492 posts
15 years ago
james Brown's avatar james Brown

Is there a way to set the parameters so that it will scale within a specified width AND a specified height that is DIFFERENT from one another? So for example if I wanted all of my images to stay within the boundaries of being 800px wide and 400px tall. I know that if I just put it in like so:

{exp:imgsizer:size width="800" height="400" src="{image}"}

It will crop and scale the image to exactly 800 x 400.

I know I can use “auto”, but that only allows you to specify one maximum dimension for width and height.

I want it to scale the image to be within the maximum dimensions for width AND height so that nothing gets cropped. Is there an additional hidden parameter perhaps?

       
okayyellow's avatar
okayyellow
16 posts
15 years ago
okayyellow's avatar okayyellow

@lumis

Thanks for the quick reply… unfortunately that doesn’t seem to add anything to the path. Any other ideas?

Also, just wanna say this plug in rocks!

       
VRDL's avatar
VRDL
23 posts
15 years ago
VRDL's avatar VRDL
Is there a way to set the parameters so that it will scale within a specified width AND a specified height that is DIFFERENT from one another? So for example if I wanted all of my images to stay within the boundaries of being 800px wide and 400px tall. I know that if I just put it in like so:
{exp:imgsizer:size width="800" height="400" src="{image}"}
It will crop and scale the image to exactly 800 x 400. I know I can use “auto”, but that only allows you to specify one maximum dimension for width and height. I want it to scale the image to be within the maximum dimensions for width AND height so that nothing gets cropped. Is there an additional hidden parameter perhaps?

Please take a look at my earlier posts, i’ve updated the module to allow such functionality.

       
Macrike's avatar
Macrike
137 posts
15 years ago
Macrike's avatar Macrike

Any chance of getting a 2.0 version? :D

       
angstmann's avatar
angstmann
225 posts
15 years ago
angstmann's avatar angstmann

Pretty sure a 2.0 version is already done.

       
Macrike's avatar
Macrike
137 posts
15 years ago
Macrike's avatar Macrike

Ah, true. Looked the other day and it wasn’t there. Should’ve looked again before asking, lol.

       
okayyellow's avatar
okayyellow
16 posts
15 years ago
okayyellow's avatar okayyellow

Hello again…

just wondering if anyone could help me out with my posts above, I really need to get this resolved because we have several sites built and ready to go using MSM but none of them will have images unless I can point to them using the full url path.

Is there something I could modify in the plug-in code to stop it from stripping the full url?

thanks in advance!

       
First 40 41 42 43 44 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.