add context to img load callback functions