Fixes problem with image posting from file