artgris / FileManagerBundle

FileManager is a simple Multilingual File Manager Bundle for Symfony
MIT License
171 stars 89 forks source link

Image versions #54

Closed ngrdanjski closed 4 years ago

ngrdanjski commented 4 years ago

Hi, my config is:

conf:
        public:
            dir: "../public/uploads"
            tree: true
            upload:
                image_versions: {'': {crop: true, max_width: 10, max_height: 10}}

And on lists i my images are in orginal file. Maybe need to update a .twig file _list.html.twig do display image version/variation.

Tnx

artgris commented 4 years ago

Hi @ngrdanjski , sorry for my late reply.

if you don't enter a key '' in the image_versions: image_versions: {'': {crop: true, max_width: 10, max_height: 10}} This will only save the 'image version' in the current folder.

but if you enter a key, for exemple 'thumbnail' : image_versions: {'thumbnail': {crop: true, max_width: 10, max_height: 10}}

This will save the original image in the current folder and create a folder with the name of the key (thumbnail) with the 'image version' in it.

I will add this in the documentation