Closed mikhail-talkshoplive closed 2 years ago
Hi @mikhail-talkshoplive , thanks for reaching out.
The GIPHY RN SDK has no logic for scaling images when the aspect ratio is not specified. We have prepared a release candidate that should fix this problem. You can try this version 1.8.0-rc.0 for testing. It would be great to get your feedback before we release v1.8.0.
Hi @mikhail-talkshoplive , thanks for reaching out.
The GIPHY RN SDK has no logic for scaling images when the aspect ratio is not specified. We have prepared a release candidate that should fix this problem. You can try this version 1.8.0-rc.0 for testing. It would be great to get your feedback before we release v1.8.0.
unfortunately same result, should I pass any specific props? (test id t64oxIpnQwF8ilGfZQ)
In 1.8.0-rc.0 we scale the content to fill the view bounds and maintain the aspect ratio. It works similarly to "resizeMode": "cover"
. We will add a resizeMode
property similar to what we have for the Image component in React Native. I think we'll do it next week. Currently, you can work with the "cover" mode, for example:
const CommentItem = ({ comment = {} }) => {
return (
<GiphyMediaView
style={{ height: 200, width: 200 }}
renditionType={GiphyRendition.FixedHeightSmall}
media={{
id: 't64oxIpnQwF8ilGfZQ',
}}
autoPlay={true}
/>
)
}
@pshoniuk your example works perfectly, thank you. resizeMode - it will be fantastic
Дзякуй за дапамогу братка @pshoniuk , Слава Украіне і Жыве Беларусь
GIPHY RN SDK v1.8.0 has been released. This version supports the resizeMode property for the GiphyMediaView component to determine how to resize an image when the frame does not match the size of the raw image.