Fixed bug where an exception was thrown when inserting images if valid_elements didn't include an ID for the image.
Fixed so empty strings gets passed to compressor instead of undefined.