Whatsapp keeps old messages in the form of encrypted data. So Whatsapp encrypts your data, and you can restore the messages when you needed. Go to WhatsApp Settings > Chats > Chat Backup. You'll see information, including when the latest backup ran. If you have deleted the pictures and messages since the last backup, you can recover them by uninstalling and reinstalling WhatsApp.