Request: images in posts visible for registered users (or min tl) only

AI-generated summary

A user, drreen, requested a feature to prevent non-registered users from viewing images in posts. codinghorror stated that this has never been requested before and there are currently no plans to implement it. However, simon provided a CSS workaround to hide images for anonymous users, which Mittineague confirmed works, although it also hides avatars in quotes and images in oneboxes. thoka also expressed interest in this feature, particularly for restricting the publishing of user faces to certain groups in a public school setting.

Hey guys

Is there a way to prevent non-registered users to see images in posts?
Lot of typical forums bring this feature with them.
I searched in discourse admin settings, but could not find such an option.
I only could find one to prevent attachment downloads.

We have no plans for this, and it has never been requested until now.

Yes, if hiding them with css is good enough for you, you can do it like this.

.anon .cooked img {
  display: none;
}
3개의 좋아요

I tried and it does work.
It also hides avatars in quotes, images in oneboxes and emoji, but I guess if the idea is to give a reduced experience to non-registered visitors (i.e. anons) then it fills the bill.

저는 독일의 공립학교에서 디스커스(Discourse) 포럼을 구축하고 있습니다.
이러한 시도에 있어, 로그인하지 않은 사용자에게는 아바타를 기호로 대체하거나, 얼굴 사진의 게시를 특정 그룹으로만 제한할 수 있는 옵션을 제공하면 매우 유용할 것입니다.