Sir, The Problem, is when you are uploading the jpg or png or svg, on the system and when PHP try to decompressed that file and put on pdf, This will leave with that residue.
Solution: Try to upload an image on the proper size and proper proportion as suggested by the user guide on Dolibarr. On the case of url linking (try not use it if it has huge bytes), It does work but if you can avoid it, since it will resulted on that problem you have. Please try using 250px by 250px low res this will be around 32kb.
( this is 120px by 120px 5.1 kb that image above) Logo on the Forum
as sample shown above, Then you will be okay. I hope you find this useful