It is at the beginning of the struct and it is used as a discriminator. And yet it seems extremely accident prone, and I should add the docs do not clarify this. At worst there should be, IMO, a function to initialize the structure. At best, there should actually be two lv_img_set_src() functions - one for paths, and one for lv_img_dsc_t structs.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix