When an image being resized doesn't exist, the preview shows a broken image

This commit fixes the display issue by not showing the image if we receive '-1' as a response.