use copy_from instead of location for images