I was having this exact issue and this was because I was returning images from a server into component that is 1 step down the path. This what I mean. See file arrangement
*projectfolder/phpfiles/component.php*
Now my images folder was located here projectfolder/images/
Now I fixed it by adding ../ so that it could skip 1 step backwards
Goodluck