Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Image picker uploaded image name can not get

Started by ami 7 years ago · 0 replies · 651 views
7 years ago

I've use image picker & also upload an image in folder successfully but uploaded image name cannot get in twig file.

I've tried below

{% if sliderfield.custom_file %}
<img src="{{ url('theme://img/') }}{{ img.custom_file }}" alt="{{ img.text }}"
{% endif %}

ymal file

sliderfield:
type: tab
title: slider
fields:
header.slider:
type: list
label: slider
fields:
.slidertitle:
type: text
label: Slider Title
id: text
.sliderdesc:
type: textarea
label: Slider Description
id: desc
.custom_file:
type: file
label: A Label
destination: 'theme@:/img'
multiple: true
limit: 5
filesize: 1
accept:

  • image/*
    .text:
    type: text
    label: Alter Text

222|690x19

last edited 06/11/19 by ami

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago