When using facebook: Don't press on the Gif on your keyboard but on the gif icon in the facebook app itself (press on the + when commenting on fb or press the emoticon next to: Add your post when making a new post)
When using Whatsapp: Don't press on the Gif on your keyboard but press on the emoticon button in your whatsapp App. on the bottom you will see gif icon and smiley icon press the gif icon.
Looking at your picture it looks like you are using the gif option from the keyboard. Don't use this one but use the gif option from the app itself.