The final solution would depend on some additional factors, like if file storage is available, how large the images are and how the images will get used.
I would start with an Image table containing at least a unique key and either the image data or a filename for the image.
The Teacher and Student tables would then each contain a foreign key referencing the Image table. If a Teacher and/or Student can have multiple images, then I would add separate mapping tables for each of them as needed. Those mapping tables can also hold additional information, like the ImageType (profile picture, cover, etc.)
If the Image table ends up having just the two columns, I would consider dropping that table and putting the image path/data directly in the Teacher and Student tables (or the mapping tables if multiple images are possible), but that also depends on if I foresee additional columns being added to the Image table at a later stage.