Hide the File Preview Image on the edit page

I’d like to hide the big preview image placeholder,

previewimage

on an Attachments Edit Form but keep the ability to delete the image, is that possible?

I’ve tried inspecting the page and getting the Selector to hide the class but that hides that image and the “Delete” link with it.

I’ve tried hiding various elements, including hit-tb-files but it hides the Delete link action too!

.hit-tb-files {
display: none;
}

deletegone

Thanks in advance for any replies :slight_smile:

taking this one step further, I’d like the option to display the filename instead of the thumbnail/icon along with a delete button. @moe has told me there is an update to the attachment field coming, but I’m not sure on the timeframe.

1 Like

According to inspection the image has the class of “fal” and “fa-file-alt” (within an i-tag)

With JavaScript/jQuery you should be able to remove the class.

This is the code which worked for me:

TB.render('component_3', function(data) {
       $("i.fal.fa-file-alt").remove();
})
1 Like

thank you I’ll try this out…