zxbodya / yii2-gallery-manager

93 stars 61 forks source link

SVG FILES #90

Closed temirovgroup closed 3 years ago

temirovgroup commented 3 years ago

I decided to load SVG like this: php composer.phar require contao/imagine-svg (ausi)

Further in the file: GalleryBehavior the replaceImage method replaced this code:

$originalImage = Image::getImagine()->open($path); //save image in original size

On this one:

if ($this->extension === 'svg') { $originalImage = (new \Contao\ImagineSvg\Imagine())->open($path); } else { $originalImage = Image::getImagine()->open($path); } //save image in original size