Symfony LiipImagineBundle: filters do not work for large images

I am currently developing the option for some users to upload images to the backend. These images should be displayed in the mobile application later.

I am at an early stage of development, I want to resize images that users upload to the server. But while I work locally with Wamp, it works fine when I want to apply a filter to images under about 1000X1000. Then the large images are not filtered, the original image is really stored, but the filtered one, which should be sent to the Internet / media / cache, is not.

I can’t find a solution yet, I have to say that I am new to Symfony development. I'm starting to think that this is due to the cache with Wamp.

Here is my configuration in config.yml for more accuracy:

liip_imagine: resolvers: default: web_path: ~ filter_sets: my_small: quality: 100 filters: thumbnail: { size: [275, 100], mode: outbound } my_big: quality: 100 filters: thumbnail: { size: [550, 550], mode: inset} 

Has anyone encountered the same problem?

+6
source share
3 answers

I ignored the symfony profiler. Now I have some additional information:

post_max_size_message -> The downloaded file was too large. Try downloading a smaller file.

+1
source

try increasing the memory limit in php.ini. It works for all heavy php codes, not just drupal https://drupal.org/node/29268

0
source

LiipImagineBundle I think mainly for filtering images, not for downloading. If you intend to upload and basically want to view the filtered images, many of them want to keep the filtered images permanently so that the filters do not start every time the cache is cleared.

I use OneupUploaderBundle to upload images and use the built-in php functions to resize and apply simple filters, and then save copies - resized with specific sizes and thumbnails. Thus, the user can upload large files, but those served on web pages are optimized and can be easily cached because they are static and do not need to be created again.

Another advantage is that the user can upload multiple images at the same time, and also supports several interfaces that allow him to beautifully design the look of your application.

0
source

Source: https://habr.com/ru/post/969435/


All Articles