With Archlinux I just had to edit the file “/usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer”
and add “image/x-xpixmap;image/x-canon-cr2;” to the line starting with “MimeType=”.
I do not know whether this works under Ubuntu.
Edit: Just checked in a Virtual Machine. Works also on Ubuntu 18.04.