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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Image picker uploaded image name can not get

Started by ami 7 years ago · 0 replies · 369 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 Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago