# Image input not working

**URL:** <https://forum.codewithmosh.com/t/image-input-not-working/7882>\
**Category:** React Native\
**Created:** [October 12, 2021, 5:00am UTC](https://forum.codewithmosh.com/t/image-input-not-working/7882 "2021-10-12T05:00:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MJ07](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@MJ07](https://forum.codewithmosh.com/u/MJ07)\
**Post date:** [October 12, 2021, 5:00am UTC](https://forum.codewithmosh.com/t/image-input-not-working/7882/1 "2021-10-12T05:00:09Z")

</div>

I have purchased the react native course from Code with Mosh , and, during the ImageInput section, he uses a function called RequestCameraRollPermissionsAsync()  
and this function is depreciated. When you write it, you get a strikethrough in VS code. Please help, and suggest a working function for the imageInpute  
Thanks

---

<div class="post-metadata">

**Author:** ![fmol](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/fmol/32/2409_2.png) [@fmol](https://forum.codewithmosh.com/u/fmol)\
**Post date:** [October 14, 2021, 1:06pm UTC](https://forum.codewithmosh.com/t/image-input-not-working/7882/2 "2021-10-14T13:06:05Z")

</div>

Just use requestMediaLibraryPermissionsAsync() instead.  
You can see how to use it under the Usage section in documentation: [ImagePicker - Expo Documentation](https://docs.expo.dev/versions/latest/sdk/imagepicker/)

---

<div class="post-metadata">

**Author:** ![MJ07](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@MJ07](https://forum.codewithmosh.com/u/MJ07)\
**Post date:** [October 16, 2021, 4:54am UTC](https://forum.codewithmosh.com/t/image-input-not-working/7882/3 "2021-10-16T04:54:01Z")

</div>

Thanks alot. I’ll try it and get back to you
