I don’t know - somehow you have to configure how your application is built - what include directories the compiler is supposed to use and what libraries it’s supposed to link against.
I guess you configured it to link against libSDL2 already - you gotta do the same for libSDL2_image