This is not a real solution but a workaround.
As reported in this comment for the bug report on github (https://github.com/YunoHost-Apps/pleroma_ynh/issues/110#issuecomment-602163230) it is sufficient to edit the file
/etc/pleroma/config.exs
the lines
config :pleroma, :instance, static_dir: "/var/www/pleroma/instance/static"
config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/www/pleroma/instance/uploads"
and creating the directory
/var/www/pleroma/instance/uploads
with the user.group “pleroma.pleroma” (the directory static exists).
Now the image sending would work.