Fixed uploading images

Removed not needed protocol
Instead of checking string, now checking actual class of image
Version update to 3.1.20