Comments (4)
okay actually the Versions section got me thinking that my Solito version is quite old; so I upgraded to the latest Solito of 4.2.0
and now it works as expected ; one issue down
While I am at this, I have two questions @nandorojo :
-
I saw that
expo-image
hasImageBackground
implementation to mimick https://reactnative.dev/docs/imagebackground ; does SolitoImage also implementsImageBackground
? if so, how can i access it / have similar implementation ? not sure if there is a nextjs-image equivalent or not -
Nextjs issue
(Image... has either width or height modified, but not the other )
Looking at this similar issue (see comments in link) => vercel/next.js#40762 ; is there a workaroud when using SolitoImage so that i don't have to add style={{ width: 400, height: 400 }}
like below:
<SolitoImage
src={`data:image/;base64,${pickedImage.base64}`}
height={400}
width={400}
// code below needed https://github.com/vercel/next.js/issues/40762
style={{ width: 400, height: 400, marginTop: 10 }}
alt="picked image"
/>
from solito.
Try the unoptimized
prop.
from solito.
Try the
unoptimized
prop.
I tried adding unoptimized
but still got the same error below:
Image with src
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgQAAAFfCAYAAAAxo
9Q/AAABXWlDQ1BJQ0MgUHJvZmlsZQAAKJF1kMFKAlEUhv8xTbKBXEhBRMwqCExEW......
v/HX+nfDd6ioD5P//SlU+68/vf5cAAAAASUVORK5CYII=" has either width or height modified, but not the other.
If you use CSS to change the size of your image,
also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.
Is it related to vercel/next.js#40762 somehow?
As for my question number 1 ; Does Solito
have ImageBackground
component implementation?
Because we can technically do import { ImageBackground } from 'expo-image'
; but maybe for nextjs we need to adjust Image
to have {children}
component overlay on top of it
from solito.
Rather than ImageBackground
, you can simply pass fill={true}
and render it before the items it should go behind.
from solito.
Related Issues (20)
- Can't use react-native-reanimated with Expo Router Starter HOT 5
- How to deploy solito monorepo to vercel HOT 4
- target blank is not propagated to next/link HOT 3
- [EXPO SDK 50] [expo-head] Error: generic class 'Field' requires that 'Date' conform to 'AnyArgument' HOT 3
- Excessive question mark using `useUpdateSearchParams` HOT 1
- installing with expo v47
- passing Omit<ComponentProps<typeof TextLink>, 'className'> to <TextLink> results in an error HOT 2
- Uncaught Error: Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering. HOT 1
- Add Search Options to Docs HOT 2
- MotiLink not working with App Router HOT 3
- Rewriting the url using the `as` parameter clears params on native. HOT 5
- `useUpdateSearchParams` does not work with the react native app HOT 1
- `usePathname` does not work with react native app HOT 1
- onLoadingComplete deprecation notice HOT 3
- `useSearchParams` crashing on react native app HOT 2
- Link / push change URL+ execute getServerSideProps, but "setParams" (createParam) change URL but no getServerSideProps HOT 2
- Tanstack Router Support
- Add Support for Vike
- Fix fetchPriority name for React
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solito.