How to prevent users to use gif images?
-
Haha, that might be one of the most annoying avatars I've seen.
-
There are several ways to do this on the browser level. You could maybe block gifs from being uploaded at all?
-
I did't know its 100% solution or not, but you can add this custom CSS in ACP:
.icon img[src*="gif"] { display: none; }
This is not full solution, just example, you need add more classes, because in nodebb user avatar in different places with different classes
Ps. For example, I turn off round avatars at my forum with this css(may be little bit dirty solution, but works):
.topic .posts .icon img, .topic .posts .icon .user-icon, .users-container .users-box img, .users-container .users-box .user-icon { border-radius:10%; } .categories>li .card .user-icon, .category>ul>li .card .user-icon, .categories>li .card img, .category>ul>li .card img, .avatar.avatar-rounded, .account .cover .avatar-wrapper,.posts-list .posts-list-item .user-img{ border-radius:10%; } .categories>li .content img, .category>ul>li .content img, .categories>li .content .user-icon, .category>ul>li .content .user-icon{ border-radius:10%; } #menu .chat-list li a img, .header .chat-list li a img, #menu .chat-list li a .user-icon, .header .chat-list li a .user-icon, .chats-list li .user-img, .expanded-chat .chat-content li.chat-message .chat-user-image, .chat-modal .chat-content li.chat-message .chat-user-image{ border-radius:10%; } .header #user_dropdown img, .header #user_dropdown .user-icon{ border-radius:10%; }
-
I think if you convert the uploaded user avatar to PNG it should be unanimated... it's a setting in the ACP
-
@julian said in How to prevent users to use gif images?:
@Bri is correct, you can force NodeBB to convert it to PNG.
Also, if you don't use imagemagick, then you cannot upload gifs, as the native image processor doesn't do GIFs
We don't use imagemagick and i'm able to upload gif's. We do use imgur plugin?