Converted to use generic upload image functions