How to prevent users to use gif images?



  • < Like this.

    Is there a way to dissable movement in profile pictures?


  • Anime Lovers

    Threaten to ban them. :p


  • Plugin & Theme Dev

    Haha, that might be one of the most annoying avatars I've seen.


  • Global Moderator

    There are several ways to do this on the browser level. You could maybe block gifs from being uploaded at all?



  • @hek its one of my members avatar, there Are a few members that use similar avatars hahaha.



  • @PitaJ Yes i did, but they van use an URL and that van be a gif.

    Is it possible to turn it off?



  • 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%;
    }
    

  • Community Rep

    I think if you convert the uploaded user avatar to PNG it should be unanimated... it's a setting in the ACP


  • Admin

    @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 :smile:



  • @julian yes, but they use the "Upload new picture from URL" function. And that way they get GIF files as avatar.

    If I use the settings for uploading avatars to be in PNG the uploaded avatars by URL are still GIF.


  • Admin

    Ah that is true... come to think of it, is there a way to bar users from specifying external URLs as avatars?



  • @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 :smile:

    We don't use imagemagick and i'm able to upload gif's. We do use imgur plugin?



  • @torn2 yes me to, the imgur plugin :)


  • Admin

    Imgur will allow you to upload gifs (I should hope so!)... I don't think there's a way to pull a png back from imgur (that's actually a png)


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.