I decided to create a flexinode content type to replace the regular blog type. The reason I did this was to have the ability to add images directly into my post.

I have two flexinode fields, image and text area. It works well because I can control it with CSS and the whole image upload process is very user friendly, except for one aspect - Image Size.

With flexinode images, you have to constrain the uploaded image to a certain size (ie. 400x300 and 100kb). This is very confusing for the users of the site, because they have to determine how to first resize their picture to the proper dimensions before uploading. I need a way for flexinode images to resize automatically to the specified size so the user can bypass this step.

The image module along with the user avitar picture are both able to resize images automatically to conform to a size set by the admin. I noticed that in admin-->setting-->flexinode it has "image processing" with a defined thumbnail size... looks like it uses imagemagick. However, I don't know how to use this to my advantage.

One thing suggested to me in the past was to allow a large size image for uploading (ie. 1600x1200) and then resize this upon display using CSS. Problem is, the huge picture needs to be loaded onto the page, only to be displayed at a much reduced size.

Please, if you know how to incorporate the auto image resize feature that image module or user avitar uses into flexinode, please respond. I will be so appreciative and I know many others will be as well.

THANK YOU !!!

Comments

John Hwang’s picture

DannyV,

it's me again~ ;^)

1) There should be an option for "image processing" which lets you specify the thumbnail image. May I suggest 120x90? or whatever...

2) As for the imagemagick just type in the path to the binary file "convert."

"/usr/local/bin/convert"

Mine's located under "/usr/local/bin." You can easily find where convert is on a unix/linux box by typing "which convert" in the command-line/shell. Drupal/flexinode will use the convert program to resize the image. Flexinode doesn't automatically use php_gd so you'll need to specify where the convert program is.

If you're on a Windows server, then you can download the convert program and install just the binary. Just use the full path to the convert program and all should be fine

3) Also, when you create an image field for your flexinode, you can specify the dimension in the options box. If you want you can constrain the uploaded image to whatever dimension and whatever size. Edit the "image" field type for your flexinode content type and set it to the appropriate default image. Then check the flexinode settings for thumbnail image size.

potential’s picture

Thanks for such a thorough response John. I will have to give that a try tomorrow (getting real tired now). Sounds like the image processing feature is just what I was looking for.

Assuming I can get imagemagick to work as you described, I can allow for a very large size image in the flexinode image settings (therefore, the user won’t get an error), which will then be converted to the thumbnail size I specify with “image processing.”

A question that comes to mind then, is how do I tell flexinode to output the thumbnail picture in the node? Ideally, upon clicking the thumbnail picture, it would link to the full-size picture.

Thanks for all your assistance!

potential’s picture

I appoligize for my newbieness, but I still find myself confused. I am using a windows machine, with the XAMPP server package (unix based) installed locally.

I'm using the default imagemagick path you wrote above but I don't believe any image resizing occurs when I upload my photo. In my files folder, I see just the full size image. If the thumbnail was created, where would it be and how would I output that into the flexinode content?

Thanks again!

John Hwang’s picture

Where did you install imagemagick and which path did you specify in the textfield under the flexinode settings page?

astra’s picture

I also want to try the auto image size feature

verot’s picture

I've posted a quick fix to resize the images on the fly.

http://drupal.org/node/42748