I want to show image in Items list view as it shows in the above image instead of url, without using image view option as shown below
1 Like
Ok, I missunderstood your requirement.
Use formatters for customize listview …
frappe.listview_settings['Item'] = {
formatters: {
image(value) {
if (value) {
return `<img src="${value}" style="height: 40px; width: auto; border-radius: 4px;" />`;
}
return '';
}
}
};
Hope this helps.
9 Likes
Thanks, it works
Is there a utils function that is used to return small size of image, instead of a full image ?
Can you insert an image to show where to put these code? I tried but failure. Thanks
@focuser2009
You need to create new Client Script
Yes, I made it, but still not display in list view, see below:
Where is the mistakes?
Thanks in advance.
you are applying this code on form which is wrong.
Select List in Apply To,
then this code will work
Ok, I got it. thanks so much.
I got it now, thanks so much ![]()
1 Like









