-
Notifications
You must be signed in to change notification settings - Fork 22
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
Optimize image loading #587
Labels
Comments
😱 I had no idea this was available |
Currently having a look and I haven't yet spotted how this works with Contentful Sync API which is implemented at the moment, this may be only an option when using the Asset api directly. |
Apologies, I'd misunderstood that the Sync API doesn't sync the image data just the url of the images so was looking in the wrong place. |
Lily418
pushed a commit
that referenced
this issue
Jul 9, 2018
Lily418
pushed a commit
that referenced
this issue
Jul 19, 2018
…g-resize Optimize Contentful image loading
markholland
added a commit
that referenced
this issue
Nov 19, 2018
markholland
referenced
this issue
Nov 19, 2018
…mage-loading-resize Revert "Optimize Contentful image loading"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Contentful has an API to crop and resize images. Currently we just load the original image regardless of size. To help with the Android out of memory issue and decrease the bandwidth consumption of the app we should load the appropriate sized image for where we are displaying it. As an example Cabaret_finalists.jpg?w=500&h=500&fit=fill.
This image originally returns the following data:
We would need to figure out the size of image to request. Perhaps by using React Natives onLayout handler (although not using this API would be preferred).
The text was updated successfully, but these errors were encountered: