Offload image loading and compression to db thread

1 job for !94 with 157-image-attachments in 2 minutes and 11 seconds (queued for 45 seconds)
detached
Status Name Job ID Coverage
  Test
passed ktlint #14707

00:02:11