I am trying to use MIGX with pthumb for a gallery.
This is the part of the template
[[getImageList?
&tpl=`pictureImage`
&tvname=`gallery`
]]
tpl
<figure>
<picture>
<source srcset="[[pthumb? &input=`[[+image]]` &options=`f=webp`]]" type="image/webp"/>
<source srcset="[[pthumb? &input=`[[+image]]`" type="image/png"/>
<img src="[[pthumb? &input=`[[+image]]`" alt=`[[+title]]`/>
</picture>
<figcaption>[[+description]]</figcaption>
</figure>
Gallery tv
[{
"caption": "Info",
"fields": [{
"field": "title",
"caption": "Title"
},
{
"field": "description",
"caption": "Description",
"inputTVtype": "richtext"
}
]
},
{
"caption": "Image",
"fields": [{
"field": "image",
"caption": "Image",
"inputTVtype": "image"
}]
}
]
[
{
"header": "Title",
"width": "160",
"sortable": "true",
"dataIndex": "title"
}, {
"header": "Image",
"width": "50",
"sortable": "false",
"dataIndex": "image",
"renderer": "this.renderImage"
}]