Hi Arnaud,
Images are expected to be part of the module and relative URLs are expected,
where the base is the root of the module’s folder. So src=“picture.jpg” would
refer to a file in the module in the same location as the data and index files.
Both SWORD and JSword support this. But I’m not sure if all frontends can
render images, let alone whether all types of images are supported (I’d doubt
SVG is supported).
I’m pretty sure that data URIs haven’t been tried.
I think there is a module with images of Dore Woodcuts. I think the Xiphos
module repository has some image modules.
In Him,
DM
> On Oct 26, 2025, at 1:04 PM, Arnaud Vié <[email protected]> wrote:
>
> Hi all,
>
> Looking at the ability to integrate images inside a bible through the OSIS
> "figure" tag, I have a few questions, regarding which URI schemes and which
> image formats are supported - or whether the figure src is transformed in any
> way (eg. by osis2mod) before being sent to the rendering engine.
>
> The OSIS spec specifies the "src" attribute as xs:string, without details.
> The OSIS manual explicitly allows any image format ("It can be used to point
> to any type of image"), but this does not say if any format in particular is
> required to be supported by all implementing libraries - and it does not
> mention URI schemes either.
> The crosswire wiki only contains one "figure" example, which is a local URI
> src="picture.jpg"
>
> Can a module writer assume that any image URI which is supported by in a web
> view's "img" HTML tag can be used directly in an OSIS "figure" tag ?
>
> In particular, would embedding a JPG/PNG/SVG file in the OSIS itself using a
> data URI be supported ?
> (data URIs allow including the binary data inside the URI itself, usually
> base64 encoded).
>
> Thanks and best regards,
>
> Arnaud
>
> _______________________________________________
> sword-devel mailing list
> [email protected]
> https://crosswire.org/mailman/listinfo/sword-devel
_______________________________________________
sword-devel mailing list
[email protected]
https://crosswire.org/mailman/listinfo/sword-devel