You may watch the video but the trick here is to put the variable of the image you want to print in
var_dump(); then see what it is going to give you. so if it gives you the image and its extension like myimage.png then its fine but if it doesn’t then it has to be fixed.