How can I prevent posts with no internal image from showing a preview? Don't show any default image?

This discussion is related to the IndexDiscussionImage addon.

Not really a question, I figured this out, but I thought I'd post a solution in case anyone had a similar issue.

Simply set the default image as a 1px x 1px transparent png. You can use mine if you like: https://www.gerhardfourie.com/forum/plugins/Transparent-1px-by-1px.png

That pretty much does the trick 😎

R_J

Comments

  • A further improvement, in case you want you to add a border for instance to your image (you don't want the border around the transparent 1px by 1px)

    Use this in the css:

    img[src*="/forum/plugins/Transparent-1px-by-1px.png"] {display: none;}
    
Sign In or Register to comment.