One of the things my Ubercart module needs to be able to do is programatically upload or link (this being preferred as it means I don't have to mirror it) an image and attach to Ubercart's product node. The user will give me some information, and my module will fill in the name, description, and product image. The product image is a big hurdle which I have no idea how to conquer.
The core Ubercart module
product has a dependency on Drupal's core
Image module, which is where I'm assuming is handling all the images. I thought I could learn how to do it by looking at the
product module's code, but I'm having trouble wading through and understanding the thousands of lines of code. I'm not even sure of any other module that does something similar to what I'm doing, so I'm out of example code.
Does anyone know of a way to accomplish what I'm wanting to accomplish?