I have a question about liip Imagine
P粉021553460
P粉021553460 2024-03-19 18:37:45
0
1
293

I'm using symfony 5.4 and I just need to install the liip Imagine package to manipulate my images. However, after configuring everything, no images appear in my browser and when I check, I get my code and the following error message: http://localhost:8000/media/cache/resolve /my_thumb/images /properties/629a464aa81ef086062845.jpg 404 (Not Found)

In my project I don't even have any autogenerated directory for media/cache/..... in the images directory.

This is the content of my liip_imagine.yaml file:

# Documentation on how to configure the bundle can be found at: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
liip_imagine:
    # valid drivers options include "gd" or "gmagick" or "imagick"
    driver: "gd"

    filter_sets:
        cache: ~
        my_thumb:
            quality: 75
            filters:
                thumbnails: {size: [360, 230], mode: outbound}

This is what I wrote in my twig file:

<img src="{{ vich_uploader_asset(property, 'imageFile') | imagine_filter('my_thumb') }}" class="card-img-top" alt="">

Please I need help, I tried several tricks like adding parser and loader but none of them solved my problem

P粉021553460
P粉021553460

reply all(1)
P粉649990163

Also use this setting in the configuration file

resolvers:
    default:
        web_path:
            web_root: ~ # %kernel.project_dir%/public (%kernel.project_dir%/web for Symfony 

Where are your files generated? You have to add a symbolic link to the uploaded image path using the public/../media/cache folder and then you will see the image in your browser

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!