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
Simplify <Image /> component #102
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stefanoverna
force-pushed
the
native-image
branch
from
April 1, 2024 14:23
22ec389
to
5c593fa
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 1, 2024 14:34
5c593fa
to
0358d69
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 1, 2024 14:39
0358d69
to
880fa87
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 2, 2024 13:30
880fa87
to
d8b5ea0
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
stefanoverna
force-pushed
the
native-image
branch
from
April 2, 2024 14:54
d8b5ea0
to
8e7ac32
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 2, 2024 15:02
8e7ac32
to
ac3bbd5
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 2, 2024 17:39
ac3bbd5
to
5b555e9
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 2, 2024 17:40
5b555e9
to
b2bc970
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 3, 2024 06:17
b2bc970
to
1b6daf3
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 3, 2024 06:45
1b6daf3
to
f49f957
Compare
stefanoverna
force-pushed
the
native-image
branch
from
April 3, 2024 07:14
f49f957
to
4219f04
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now that both
loading=lazy
andaspect-ratio
are broadly supported (> 93% of browsers) we can avoid complex JS to achieve lazy-loaded images with placeholders!<datocms-naked-image />
is a new component that achieves that.background
on the<picture>
elementloading=lazy
aspect-ratio
andwidth: 100%
alt
during image loading is hidden withcolor: transparent
Changes to
<datocms-image>
:lazy-load
: lazy loading is automatically disabled for images usingpriority
root-style
: you can simply usestyle
to style the root elementexplicit-width
load
eventrootRef
andimageRef
as public propertiesAll the examples have been consolidated into a single SPA React application to ensure a straightforward maintenance process.