Removes unnecessary images