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

mreeves's avatar
mreeves
30 posts
17 years ago
mreeves's avatar mreeves
@ mreeves try playing with the unsharpen mask setting or not using unsharpen mask at all it can sometimes create ugly results

Hi Lumis,

Thanks for the advice and the great plugin. Unfortunately this has not resolved my problem. The square images are still unusable. I was not previously using the unsharpen mask but tried using it and it did not make any noticeable difference. Attached is a portion of a screen shot illustrating the problem.

Anything else I can try?

Best regards Martin

       
jensa's avatar
jensa
109 posts
17 years ago
jensa's avatar jensa

Hi Lumis (or someone else), I love the plugin but just got an error I’ve never seen before:

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/p.) is not within the allowed path(s): (/www/eh245) in /www/eh245/public_html/mysys/plugins/pi.imgsizer.php on line 168

Any idea as to why this happens?

J

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

@ Jensa you can download the new ver from my site i have commented out that function i was just using it for some debugging and forgot to remove it

       
jensa's avatar
jensa
109 posts
17 years ago
jensa's avatar jensa
  • deleted -
       
jensa's avatar
jensa
109 posts
17 years ago
jensa's avatar jensa

Hi Lumis, Found the source of my problem - I had defined the field that contained the image URL as XHTML. This caused EE to wrap the image URL with a set of < P > tags. No wonder that caused problems for the parsing of the path.

I’d guess others could do the same so why not add a “strip_tags” before parsing the path? Works perfect now, so once again Thank You for making this extension!

J

       
actsofgood's avatar
actsofgood
21 posts
17 years ago
actsofgood's avatar actsofgood

Thanks for this plugin!

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

I’ve been using phpThumb but would like to give this a go. But i’m not sure of it’s full feature set.

Can this create several cached images of several different sizes (eg a small thumbnail and a medium thumbnail)?

Can this create non-square cropped images?

Thanks

       
R.BIRD's avatar
R.BIRD
41 posts
17 years ago
R.BIRD's avatar R.BIRD

Image Sizer not working on IIS. May be path variable problem specific to IIS. Preferences are set to use ImageMagick, which I have verified as working via the command line.

I should also mention that Multiple Site Manager is installed and the site in question is located at ../personna relative to the EE system directory.

Here’s my test on EE:

{shaving-product-image}

{exp:imgsizer:size src="{shaving-product-image}" width="200"}

which outputs:

http://10.1.201.17/personna/images/products/product_matrix3_4cart.jpg

/personna/images/products/cache/product_matrix3_4cart_200x213.jpg

The unsized image is displayed properly. The sized image is not displayed or created.

Any idea on how to get this working?

Debug output looks like this:

Array ( [scheme] => http [host] => 10.1.201.17 [path] => /personna/images/products/product_matrix3_4cart.jpg )

Array
(
    [dirname] => /personna/images/products
    [basename] => product_matrix3_4cart.jpg
    [extension] => jpg
    [filename] => product_matrix3_4cart
)

D:\asrco//personna/images/products


out_url=D:\asrco\personna\images\products

out_url=D:\asrco\personna\images\products/product_matrix3_4cart.jpg

Array
(
    [0] => 324
    [1] => 344
    [2] => 2
    [3] => width="324" height="344"
    [bits] => 8
    [channels] => 3
    [mime] => image/jpeg
)


out_url=//personna/images/products/cache/product_matrix3_4cart_200x213.jpg
remove_double_slashes=/personna/images/products/cache/product_matrix3_4cart_200x213.jpg
       
R.BIRD's avatar
R.BIRD
41 posts
17 years ago
R.BIRD's avatar R.BIRD

[UPDATE] Sure enough, switched to Apache and all of this trouble with Image Sizer went away. I read somewhere that path variables are troublesome under IIS. That could have been the source of the problem, but I don’t know.

I’ve never been fond of IIS, but in this case it wasn’t my decision.

       
mattbrighton's avatar
mattbrighton
50 posts
17 years ago
mattbrighton's avatar mattbrighton

Hi David/Lumis

I read you’ve switched to the EE image library rather than GD.

I’m in the process of creating an ultra-minimal EE theme, and I wondered how easy it would be to add an option to colour convert to black&white;/ grayscale when imgsizer is doing its thing (and indeed if this is even possible with that library)?

My alternative would be phpthumb, but I’m trying to keep everything lightweight…

Thanks.

       
actsofgood's avatar
actsofgood
21 posts
17 years ago
actsofgood's avatar actsofgood

Love this plugin. I had some problems today though when we moved a site to a new server. Some pages that were using this extension were just rendering completely blank.

I figured out that the pages were not rendering when the source image I was trying to resize was too big. (not sure if it was file size problem or pixel width problem, I assume, file size.) The pages where the plugin had to resize a smaller image had no problem rendering. Luckily I only have about 5 or 6 images so I made the rest of the source files smaller. They were anywhere from 2 to 5mb in size.

I thought this might be helpful to someone trying to figure out why some pages might come up blank. But I also wanted to ask if anyone knew where this size problem was probably happening. Is it some server side php setting or maybe the plugin itself? Anything I could maybe do about it or find out an exact limit?

Thanks!

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

Hiya,

This is most likely a PHP memory limit problem and not the plugin itself. Resizing images on a server is a very processor intensive routine so you will probably need to up your php memory_limit. If you have access to the php.ini file then you can do this fairly easily. If not and you can use .htaccess files you may be able to do it in this way also.

If you’re unsure then your host should be able to help you out with this as it is on their servers and they will be able to tell you what you can do to alleviate this problem but I would say that this is probably most definitely down to not enough available memory to run the process.

Hope that helps.

Best wishes,

Mark

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

Hi Lumis,

Sorry to resurrect the post like this but was just trying something out today with your excellent plugin and was wondering where I am going wrong.

The plugin works absolutely fine in every single respect but when I set the width = height to get square centre cropped images for some reason in my cache folder I get two versions. One version which is set to the correct dimensions but another set which are a lot lot larger. I have width & height currently set to 196 but I am getting two loads of images. One set called like this :

IMG_8873_511x511_196x196.jpg

and one called like this

IMG_8873_511x511.jpg

Not too sure why it would be making the 511x511 ones though?

Do you know of a reason for this or am I doing something positively stupid? 😉 I have been known to do that from time to time!! 😉

Any help with this would be really appreciated as I am going to be using this on a site where I am going to potentially have thousands of images and need to save as much space and bandwidth as I possibly can.

Thanks again for such an awesome plugin which totally knocks the speed socks off phpThumb!!! 😊

Best wishes,

Mark

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

updated v.2.0

* no longer uses EE's Image lib (requires GD lib be installed)=(more options to come)
* Transparency on GIF and PNG are maintained.
* no longer creates a intermediate image for square sizing saving disk space
* large image files are processed.
       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

David,

If I wasn’t married then…

… well actually better not go there!!

Checking this out immediately. If this does what I think it does which I’m sure it does from your description then you are seriously one heck of a chap. I ask one day and it is implemented the next!!

Wow you are truly a gent! 😊

Anything I can do to repay you let me know.

Best wishes,

Mark

       
First 8 9 10 11 12 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.