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

josh Jensen's avatar
josh Jensen
3 posts
16 years ago
josh Jensen's avatar josh Jensen

When I first loaded the Plugin I called the Tag and all should have worked but it did nothing.

If you have this experience make sure you add a directory called “sized”(/images/sized) under your default images folder with the permissions 777.

After this it works brilliantly.

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

@sherrills

Just by looking over the documentation of stand alone image editor it looks like it should work like this.

{exp:image_editor:images entry_id="16" field_name="my_images" upload_destination="1" limit="2"}
    {exp:imgsizer:size src="{image_source}" width="200"}
{/exp:image_editor:images}

I have not tried it though.

       
Richard Frank's avatar
Richard Frank
200 posts
16 years ago
Richard Frank's avatar Richard Frank

This thread is ridiculously long! Quick answer please: any reason I should use this over PHPthumb, which I’m comfortable and familiar with. (Could understand why a new user might want to use imagesizer.)

       
EliVZ's avatar
EliVZ
37 posts
16 years ago
EliVZ's avatar EliVZ

Because it’s easier and doesn’t require that PHP parsing be turned on in your templates. But if you prefer PHPthumb, then use that…no one’s stopping you!

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

I may be wrong about this so don’t shoot me, But doesn’t phpThumb reprocess the image every time it is called?

       
Danny T.'s avatar
Danny T.
426 posts
16 years ago
Danny T.'s avatar Danny T.

David,

I was wondering if you’ve ever thought about making this into an extension? I know it certainly adds bloat, but with the inclusion of base_path and base_cache, it seems to make sense for maintenance sake to have them in a single page. Image Sizer will certainly be commonly used, and with bigger sites have tons of templates, maintaining the base_path/cache’s can turn into a nightmare.

Not a knock on the module! Simply a request for added convenience. I’ve no complaints whatsoever of how it functions. =) Thanks for your contributions again. I was certainly surprised to see your active contributions come up so suddenly after a year and was very glad! =)

Cheers mate!

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

@Danny One thing to keep in mind is that base_path and base_cache are optional. the plug-in defaults base_path to your domains web_root path and the base_cache defaults to the /web_root+/images/sized/ folder.

I have thought of making it a module rather than a plug-in. Making it a module would allow a user set defaults which would simplify the auto detection of the server paths especially considering all the different server configurations out there…

I have image sizer setup on this site which is my day job. We publish thousands of images for news articles a week with sideshows and default images for video, also allot of user submitted photos, live cameras and weather imagery which all there size variations are controlled by Image Sizer. So my reservations to a big change like making it a module at this point is what would i need to change to implement it there.

I think by having the base_cache as an option per template tag rather than a hard set option in the CP is actually a plus. So i can control on a per template tag basis where the cache is stored. An example would be for my user submitted photo content I can cache that to a separate location and then cache my News images to another.

I know it could be a module and have the params in the module template tag override the defaults and the tag could remain the same structure. So i guess a module is an option. however my hopes are that the functionality of Image Sizer are built in features of EE2.0 but i have not gotten my hands on a developers release yet so i don’t know.

       
e-man's avatar
e-man
1,816 posts
16 years ago
e-man's avatar e-man
You can definitely use the Extract URL plugin with the Image Sizer plugin though as I did it some time back but don’t really do things that way any more as the File extension way is just so much easier.

Mark, care to elaborate how you got this to work?

This code works (of course):

{exp:imgsizer:size src="http://www.stookstudio.com/images/uploads/p_and_t.jpg " width="100"}

but the combination with extract_url doesn’t do anything:

{exp:imgsizer:size src="{exp:extract_url}{post_image}{/exp:extract_url}" width="75"}

(where {post_image} is an image uploaded through EE’s standard file upload button)

Any tips?

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
You can definitely use the Extract URL plugin with the Image Sizer plugin though as I did it some time back but don’t really do things that way any more as the File extension way is just so much easier.
Mark, care to elaborate how you got this to work?

I would love to but just now I’m not at a computer that gives me as much coding chances 😉 I do seem to remember only being able to get this to work with one of the flavors of that plugin though as I seem to remember there being more than one if I remember it correctly.

Have you tested to see if you just put in the extract plugin to see that it does return the correct image URL?

If you’re still having problems with this later on then I’ll take a better look when I’m back at home again.

Best wishes,

Mark

       
e-man's avatar
e-man
1,816 posts
16 years ago
e-man's avatar e-man
Have you tested to see if you just put in the extract plugin to see that it does return the correct image URL?

Yes, the extract plugin by itself works just fine.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Hmm looking at your code above I seemed to remember that you had to either pass in the custom field to the plugin or say exactly what it was that you wanted returning.

Which one of the plugins are you using? Do you have the forum link to it? I remember now that there are 3 of the plugins if I’m thinking rightly on this. Might be a missing parameter or something.

Will take a better look at this tonight though when I get home if you don’t sort it out before then.

Best wishes,

Mark

       
e-man's avatar
e-man
1,816 posts
16 years ago
e-man's avatar e-man
Which one of the plugins are you using?

Mark if it helps, I’m using this one: http://expressionengine.com/downloads/details/extract_url/

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Aha I’m not familiar with that one so never used that one in the way you are trying to do. Might just need to add in the parse=”inward” parameter to the plugin tag in order for it to work possibly.

Failing that the plugins that I have used before are located here and here. There is a third one but I’m in a little rush at the moment and can’t find that at the moment but I’m pretty sure one of those two should do it for you.

Might just want to give them a go see if they work better for you in this instance.

Hope that helps a bit.

Best wishes,

Mark

       
e-man's avatar
e-man
1,816 posts
16 years ago
e-man's avatar e-man

Tried parse=inward already but no go… I got it to work by using an embed, so this does work:

{embed="test/display_thumb" source="{exp:extract_url}{post_image}{/exp:extract_url}"}

and, inside the embed display_thumb:

{exp:imgsizer:size src="{embed:source}" width="75"}

Thanks for sparking off that train of thought 😊

Addendum: Interestingly enough, this does work with the Extract URL Plus plugin:

{exp:imgsizer:size src="{exp:zm_extract_url_plus show="%full_url"}{post_image}{/exp:zm_extract_url_plus}" width="75" height="30"}

added bonus is that here the original alt text is preserved as well.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Glad you got it working but one of those other plugins should have done the job as I know I’ve done that before. An embed will probably obviously do what you need but I’m just one for using as few embeds as possible, makes it easier to see what’s going on 😉

Anyway glad you have it working though.

Best wishes,

Mark

       
First 28 29 30 31 32 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.