You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to get pictures to show by mapping picture: <string> to picture: { url: <string> }, then using the fieldTypes prop to tell MapFilter that pictures.url was an image. Is there an easier way to do this, or is this THE way?
The text was updated successfully, but these errors were encountered:
It will try to guess if a property is a link to an image, but the algorithm right now depends on detecting an extension on the URL and is unreliable.
It would be possible to do requests to a URL and read the first few bytes to see if a field is an image, but that would make the field analysis async and add many network requests.
I think using the fieldTypes prop is probably the best way right now. You should not need to map anything to picture: {url: <string>} though, picture: <string> should work, if you set the fieldTypes.
K. Definitely low-priority, but would be nice. I had a different form that had the images at photo: { url: <string> }, which I re-mapped as above. Would be cool for MF2 to just find it. But like I said, I have something that works here so I'm good with mapping/fieldTypes being the way to go for now. Thanks!
To discuss:
I was able to get pictures to show by mapping
picture: <string>
topicture: { url: <string> }
, then using thefieldTypes
prop to tell MapFilter thatpictures.url
was an image. Is there an easier way to do this, or is this THE way?The text was updated successfully, but these errors were encountered: