I\'m trying to get my Chrome Extension to inject some javascript with content_scripts, using this previous answer as a reference.
Another reason for getting this error is if the url is being blocked by CORS. Check the network request header of the page to see if it contains Content-Security-Policy:
Content-Security-Policy: default-src 'self' http://example.com; connect-src http://example.com/; script-src http://example.com/
You can try opening the url in a new browser tab to verify the image url is correct:
chrome-extension://mjcbjlencnokpknflpneebajalcnnifo/images/pattern.jpg
One way around this is to use an image data URI:
data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7