symfony easy admin bundle does not show image of vich uploader bundle

0

Good night programmers, I'm stuck on a problem all afternoon, you know how, trying to upload an image using the vich uploader bundle for symfony and show it on easy admin

I'm following the tutorial ( link )

I managed to upload the image, but it is not showing up in the easy admin listing

The code looks like this:

1- configuring the easy admin view

#easy_admin.yaml
easy_admin:
  entities:
    Manchete:
      class:  App\Entity\Manchete
      form:
        fields:
          - titulo
          - descricao
          - link
          - {  property: 'arquivoDaImagem', type: 'file', base_path: '%app.path.manchete_images%',
               help: 'selecione uma imagem para a manchete',
                , label: 'Imagem da manchete' }



      # ...
      list:
        fields:
        - titulo
        - descricao
        - link
        - {  property: 'imagem', template: 'vich_uploader_image.html.twig' }
      # ...
      show:
        fields:
        - titulo
        - descricao
        - link
        - {  property: 'imagem', template: 'vich_uploader_image.html.twig' }
  

below are the path settings to save the image - >

#vich_uploader.yalm
vich_uploader:
    db_driver: orm

    mappings:
        manchete_images:
            uri_prefix: '%app.path.manchete_images%' 
            upload_destination: '%kernel.project_dir%/%app.path.manchete_images%'
#services.yaml
parameters:
    locale: 'en'
    app.path.manchete_images: /uploads/images/manchetes
  

The folder is being created and the images are being saved there:

  

butineasyadminappearsthebrokenimage

I could not find many references to this problem ... only 1 or 2 and it was not enough to solve what happens here ...

    
asked by anonymous 14.11.2018 / 23:58

0 answers