Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no picture tag #240

Open
Johann-Goncalves-Pereira opened this issue Jun 7, 2022 · 2 comments
Open

There is no picture tag #240

Johann-Goncalves-Pereira opened this issue Jun 7, 2022 · 2 comments

Comments

@Johann-Goncalves-Pereira
Copy link

Johann-Goncalves-Pereira commented Jun 7, 2022

I try to find the picture tag, but It doesn't exist in the Elm html package.

@mbucc
Copy link

mbucc commented Mar 11, 2023

Until this is merged, a work around is to use the attribute function in Html.Attributes.

I compiled but have not tested this example.

import Html.Attributes exposing (..)

logo : Html msg
logo =
    a
        [ img
            [ src "logo-medium.webp"
            , attribute "srcset" "/img/logo-small.webp 384w, /img/logo-medium.webp 683w, /img/logo-large.webp 1280w"
            , attribute "sizes" "(min-width: 2,048px) 1280px, (min-width: 768px) 683px, 25vw"
            ]
            []
        ]

@Johann-Goncalves-Pereira
Copy link
Author

Yes, Html Node is useful as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants