Opera warns about insecure connection in case of user.css images


When including a local picture file with user.css (using url(file://localhost/...)) Opera shows a security warning. Unfortunately you only get following message in the security panel:

Site not secure
The connection to example.com is not secure. Do not use it to submit sensitive information.
The server attempted to apply security measures, but failed.


You have to implant the picture as "Data URI". Following css property is given as an example:


This is a replacement for background:url('file://localhost/home/bla/backgrounds/glass_of_wine.png');. Creation via shell is pretty easy:

printf %s "background:url('data:image/png;base64,"; cat glass_of_wine.png | base64 | tr -d '
'; printf "%s
" "');"

(Beginners should start with very small pictures, 1000 byte are enough and can be yet confusing.)

Additional Note

This trick is sufficient for the "old" Opera on Linux. I don't know about the Windows/OS X versions and how Opera Next (aka "Chropera" / "Chromera" / "Opium") handles user.css.

Document of November 22, 2013, last modification on 30 November 2016. Page source

Hintergrundbild: Schräge Vorderansicht der Lok 1142.562-9