Skip to content

[Feature Request] Support of HTML embeddede images #122

@pilzcer

Description

@pilzcer

The support of HTML embedded images is helpful, when Jellyfin is not accessible from the outside and no data shall be shared with a 3rd party. From the coding point of view this should be a rather "easy" modification.

Here is an example of the HTML code of these two types:

<img src="https://upload.wikimedia.org/wikipedia/commons/8/8e/Red-dot.svg" />

vs.

<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" />

This example is taken from wikipedia.

Within UploadToImgur in the class PosterImageHandler you do already the big part of the work. This is the encoding of the image as base64.

PosterImageHandler.cs:77 > Convert.ToBase64String(File.ReadAllBytes(posterFilePath)

Within FetchImagePoster in the class PosterImageHandler a new case statement is need, where you prepend the string "data:image/jpeg;base64, " to the base64 encoded image.

So the more complex part is to add an additional switch for this option.

Thanks
Rene

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions