Image library
The setting field type Image
Arguments
Code example
@schema
{
"name" : "Image Library",
"author" : "LayoutHub",
"website" : "https://www.LayoutHub.com"
}
@endschema
<div class="sample-demo">
@if (section.settings.image !== '')
<h3>No image selected</h3>
@endif
<h1>Single image</h1>
<p><img src="@attr(section.settings.image)" width="250" /></p>
<h1>Multiple images</h1>
@include('gallery')
</div>[
{
name: 'image',
label: 'Select an image',
type: 'image',
value:{
thumbnail: '%URL%thumbnail.jpg',
value: '%URL%thumbnail.jpg',
name: 'Default'
}
},
{
name: 'images',
label: 'Images Gallery',
type: 'image',
value: [
{
thumbnail: '%URL%thumbnail.jpg',
value: '%URL%thumbnail.jpg',
name: 'Default'
},
{
thumbnail: '%URL%thumbnail.jpg',
value: '%URL%thumbnail.jpg',
name: 'Default'
}
],
options: {
multiple: true,
layout: 'list'
}
}
]How it works

Last updated