image: Add load callback registration

This implementation has a known possible memory leak, so I've added a TODO and
will improve the implementation later.