HOW TO resize uploaded image?

Talk and info about common issues

Moderator: alexandrleonenko

Site Admin
Site Admin
Posts: 6098
Joined: Jan 7th, '09, 23:18

HOW TO resize uploaded image?

Postby administrator » Oct 21st, '10, 12:42

To make image resized while uploading, you have to define following:

1. Specify folder for uploaded images and give for this folder appropriate "write" permissions.
2. Add to your "image" field in add/edit modes following attributes:

Code: Select all

"resize_image"=>"true", "resize_width"=>"120px", "resize_height"=>"",

You must define at least one of these attributes as "non-empty": "resize_width"=>"120px" or "resize_height"=>"40px" or you will get a zero-resided image.

NOTE: attributes "image_width"=>"120px" and "image_height"=>"90px" are used only for displaying image and don't effect on resizing.

Return to “ApPHP DataGrid {HOW TO}”