How do you feel about base64 encoding images?

Open
#26 2 comments 1 reaction 0 assignees View on GitHub

@schneiderfelipe is already working on this.

Since May 26, 2021.

  • #36 by @schneiderfelipe — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
julia
Domain
frontend

Research direction

Start by reviewing Hyperscript.jl's current HTML rendering behavior and the Julia Base.showable MIME examples in the issue. Determine the intended scope for image and audio support, including how base64 output should be represented, before defining tests or completion criteria.

Written by the indexing model from the issue text.

Description

using Images

img = load("my dog.jpg")

@assert Base.showable(MIME"image/jpeg"(), img)

m("div", x)

Gives me

<div>
Images.Image{blablalba} blablab
</div>

Hyperscript.jl could check Base.showable for MIME types like images and audio, and base64-encode the result. This would give

<div>
<img src="data:image/jpeg;base64,blablablalblkdjflgj42i9832d..." />
</div>

Do you think that this fits within the scope of the project?

Dominant language
Julia
Stars
105
Forks
12
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaWeb/Hyperscript.jl

All issues in JuliaWeb/Hyperscript.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.