Generate thumbnail when loading image using zend framework

I am again with a question in the zend framework. Can someone explain to me how to create image thumbnails in the zend framework after uploading the image.

Thank!

+5
source share
2 answers

Zend itself will not provide this ability http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+-+Eric+Potvin and will suggest using http://www.imagemagick.org/script/index.php . then you can use your own path

+2
source

Zend Framework, , , , .

phpThumb - , :

http://example.com/img/t/phpThumb.php

phpThumb :

/path/to/myapp/public/img/t/cache

chmod -.

phpThumb view-helper, :

<img src="<?php $view->phpThumb($origImgUrl, $desiredWidth, $desiredHeight) ?>">

url src , phpThumb, (!) :

<img src="/img/t/phpThumb.php?src=origUrl&w=200&h=150&zc=1">

resize GD/ImageMagick . . , , .

/, , , - , . , (, 640x480) public/img/someBigImage.png, .

- , , , , . .; -)

+2

All Articles