Many objects in Changelog's system have attachable images. People have avatars. Sponsors have logos. Topics have icons. Etc.
Currently, we attach images by downloading them to our machines and then uploading them via a file input on the forms. An example form:
This is fine, but many times the images already exist on the web somewhere.
We want to augment these forms to optionally accept an image URL instead of an image file. If a URL is provided, its image will be fetched and used just as if it was uploaded via the file input. All image processing/transformation should continue to work like normal.
- Our file attachments rely upon the excellent Arc (and Arc Ecto) libraries.
- This Arc issue has some discussion on how the library can be used in such a manner
- All Arc-related modules
use Changelog.file, so it's a good place for shared functionality
- Modules with image attachments:
- A basic implementation on one module/form which can be generalized to other scenarios would be a great start