avoid get image call in case there's no background picture

it seems like get_image_data was called even if we don't have a background picture