I didn’t try it yet (i’m at the office). I do a lot of triggers on the oracle database for the library where I’m working. But sqlite triggers are much more restrictive than the oracle one. (no ‘if', no possibility of changing the ‘new’ value,...).
Here I assume (but I’m perhaps wrong) that when I open an image, a line ContentType = ‘9’ of this image is created. On the creation of this line, I update the images data.
The question about slowing the database is a good one. The code itself should not trigger if the 'when conditions' are not met (which is only for screensaver images, etc.) but the trigger will trigger...
EDIT : rapid test and doesn’t work... Prevent the kobo from updating.

I need to test what happen in the database when an image is added and what happen when it is opened. I don’t think the trigger on insert is a good idea, anyway. Would be better on after update if this could be achieved but without the possibility to change new value and/or deactivate a trigger, it turns to be a loop...