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 · 665 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 Sergi, 2 days ago
1 73 2 days ago
General · by themetman, 5 days ago
2 95 4 days ago
General · by Hanns Mattes, 2 weeks ago
0 148 2 weeks ago
General · by Karmalakas, 2 weeks ago
2 221 2 weeks ago
General · by Hanns Mattes, 4 weeks ago
0 282 4 weeks ago