Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Custom field image / admin plugin

Started by Muut Archive 10 years ago · 2 replies · 621 views
10 years ago

Hi, I'm making gallery tab using list and filepicker fields, its working pretty good, but after save the input field with selected image shows just the filename, and not image itself. I have preview_images turned on in my blueprint. Dont u know what should do the trick to show selected image easily?

10 years ago

here's part of my blueprint

YAML

            header.image:
              name: image
              type: list
              style: vertical
              label: Galerie
              limit: 7
              fields:
                .text:
                  type: text
                  label: Popisek
                .picked_image:
                  type: filepicker
                  folder: '@self/gallery/'
                  label: 'Vyberte si obrázek.'
                  preview_images: true
                  acccept:
                    - 'image/*'
            .upload: 
              type: file 
              label: 'Nahrát nový obrázek' 
              destination: '@self/gallery/'
              multiple: false
              accept:
                - image/*

---

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2954 9 years ago
Archive · by Muut Archive, 9 years ago
3 1120 9 years ago