Subject: Re: bug#42521: 28.0.50; Can't include an image in a display string

From: Eli Zaretskii <[email-masked]>
Date: Sat, 25 Jul 2020 13:56:12 +0300

> Cc: [email-masked]
> From: Dmitry Gutov <[email-masked]>
> Date: Sat, 25 Jul 2020 13:26:19 +0300
> 
> Like supporting image spec placed on 'before-string' instead of 'display':
> 
> (progn
>    (erase-buffer)
>    (insert " ")
>    (setq o (make-overlay (point-min) (point)))
>    (overlay-put o 'display
>                 (propertize " text after image"
>                             'before-string
>                             (create-image "splash.svg" nil nil
>                                           :max-height
>                                           (default-font-height)))))
> 
> If this worked, I would actually prefer it.

This puts a 'before-string' property on a display string.  But
'before-string' is an overlay property, not a text property, so it
cannot be put on a string, only on buffer text.