Skip to content

feat(web): implement Images - #4387

Merged
mfazekas merged 1 commit into
mainfrom
web/images
Oct 23, 2026
Merged

mfazekas merged 1 commit into
mainfrom
web/images

Conversation

@mfazekas

Copy link
Copy Markdown
Contributor

Description

This implements Images for the web build. Images from the images prop are loaded with map.loadImage and added with map.addImage. Entries can be required assets, uris, or ImageEntry objects with sdf, scale, stretchX/stretchY and content. scale and stretch values follow the iOS conversion. The component re-adds its images after a style reload, removes them on unmount, and fires onImageMissing from styleimagemissing for names it doesn't own.

nativeAssetImages and <Image> children still warn as unsupported on web.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

I checked these on web only, from an expo export -p web build:

  1. CustomIcon: the icon renders.
  2. ScalableImages: the stretchable popup fits the text.
  3. ShapeSourceIcon: example and airport-15 render, and pin/pin3 arrive through onImageMissing. pin-rn stays missing because it needs <Image>.
  4. CustomCallout: the pin icon renders.

I also switched styles back and forth, and the icons stayed. Native code is unchanged.

Adds named images from the images prop (required assets, uris and
ImageEntry objects with sdf, scale, stretchX/stretchY and content) with
map.addImage, re-adds them after style reloads, and reports
onImageMissing via styleimagemissing. nativeAssetImages and Image
children stay unsupported on web.
@mfazekas
mfazekas merged commit 7e81c96 into main Oct 23, 2026
10 checks passed
@mfazekas
mfazekas deleted the web/images branch October 23, 2026 20:41

This branch was previously deployed

1 inactive deployment
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

Successfully merging this pull request may close these issues.

1 participant