How to Crop Images in React (react-image-crop)

Sdílet
Vložit
  • čas přidán 2. 12. 2023
  • In this video you'll learn how to use the react-image-crop library to crop images in React! You'll also learn how to use the HTML Canvas element to draw images.
    Source Code: github.com/OneLightWebDev/rea...
    React Image Crop: www.npmjs.com/package/react-i...
    Support Me: www.buymeacoffee.com/nikitadev
    Contact Me: nikitadev292@gmail.com
    #react #javascript #programming
  • Věda a technologie

Komentáře • 36

  • @muhammadmusthafa1801
    @muhammadmusthafa1801 Před 3 měsíci +4

    Thanks man, im currently on a project and you just saved me a lot of headache. Nice explanation, keep going, you gained a subscriber❤

  • @ryaaan0751
    @ryaaan0751 Před 2 měsíci

    Thanks so much for this! Very easy to follow and well explained! Keep up the good work!

  • @-linteriuml-9586
    @-linteriuml-9586 Před 2 měsíci

    Really nice video! Thanks for the step-by-step explanation

  • @hwapyongedouard
    @hwapyongedouard Před 19 dny +1

    dude , thanks, we need more under rated details like this , how about video crop? or resizer for smaller screens much like tiktok or ig reels

  • @alirezajakson9436
    @alirezajakson9436 Před 4 měsíci +1

    thank you so much , you're a life saver

  • @itaiW
    @itaiW Před 5 měsíci +1

    damn only 2 weeks ago? i got here just in time! great video!

  • @arak5754
    @arak5754 Před měsícem

    Excellent explanation. Thank you.

  • @aleksey6151
    @aleksey6151 Před 5 měsíci +1

    Bro you saved my life

  • @andreswellmann7637
    @andreswellmann7637 Před 5 měsíci +1

    Thank you so much!!

  • @charlielamb3919
    @charlielamb3919 Před 4 měsíci +1

    Thank you!

  • @diletant_av
    @diletant_av Před 5 dny

    Никит, спасибо большое за хорошее объяснение. Пережимать можно уже на бэке, например, с помощью sharp

  • @havindufonseka5048
    @havindufonseka5048 Před 18 dny

    saved my life 💯

  • @jaweki
    @jaweki Před 5 měsíci +2

    nice tutorial. Hey, do one tutorial for adjusting the crop size as user scrolls the page. this feature has been done on Tesla's (cyber truck) website.

  • @preciousegwuenu2938
    @preciousegwuenu2938 Před 5 dny

    Thanks, it helped

  • @BhawaniSingh.
    @BhawaniSingh. Před 3 měsíci +2

    You Should Make the Complete React Tutorial Playlist

  • @-linteriuml-9586
    @-linteriuml-9586 Před 2 měsíci +1

    Could you maybe do a video where you show how we can include a zoom function

  • @baudubrsl
    @baudubrsl Před měsícem

    great video!!

  • @mohammedrokerya8586
    @mohammedrokerya8586 Před 3 měsíci +2

    Many Thanks for the video! Btw, which vscode plugins you use, especially the one which was autocompleting/suggesting the code like for declaring constants.

    • @nikita-dev
      @nikita-dev  Před 3 měsíci +1

      thank you! the autocomplete suggestions is GitHub Copilot

    • @muhammadmusthafa1801
      @muhammadmusthafa1801 Před 3 měsíci

      im using aws codewhisperer. its free also works well

  • @oussamasethoum1665
    @oussamasethoum1665 Před 2 měsíci

    Thank you

  • @daFoggovien
    @daFoggovien Před měsícem

    tysm man

  • @plantnt489
    @plantnt489 Před měsícem

    Very useful video man. Is there a way to pass the inputs name to the profile component?

  • @prashlovessamosa
    @prashlovessamosa Před 5 měsíci +1

    Thanks for sharing.

  • @cunghoctiengnhat888
    @cunghoctiengnhat888 Před 2 měsíci

    when we get canvas and convert to base 64 with to toDataURL , I get a problem which is request entity too large although I use body parse to limit the memory
    can u help me handle this

  • @vladuk1love
    @vladuk1love Před 7 dny

    Hey! I have a problem with canvas preview. If my image is 16:9 everything is fine, but with a 9:16 image the canvas preview also changes resolution and becomes rectangular(I need a square)

  • @jayandraahire553
    @jayandraahire553 Před 2 měsíci

    How to rezise the image 200* 200 before uploading to server??

  • @mohammedrokerya8586
    @mohammedrokerya8586 Před 3 měsíci +1

    When I try to convert that canvas image to blob and send it to node api, it's size becomes too large. is there any other plugin or solution to this ?

    • @nikita-dev
      @nikita-dev  Před 3 měsíci +1

      You can generate a signed URL from your API, return that to the frontend, and then upload the image directly to your Cloud service via the signed url

    • @mohammedrokerya8586
      @mohammedrokerya8586 Před 2 měsíci

      ​@@nikita-dev Thanks for the solution. Currently, I am using a plugin in node api, called "multer-sharp-s3" and it works wonders. it significantly reduces image size while maintaining the best possible quality.

    • @mohammedrokerya8586
      @mohammedrokerya8586 Před 2 měsíci

      Thank you for the solution. Currently, I am using a plugin in node api called "multer-sharp-s3," and it works wonders. It significantly reduces the image size while maintaining the best possible quality.

  • @parmetra
    @parmetra Před 5 měsíci +1

    Like for Conor Bedard! ✌

  • @ryostyles9904
    @ryostyles9904 Před 11 dny

    how to resize the image?

    • @nikita-dev
      @nikita-dev  Před 10 dny

      you would need to use a separate package to resize the image (on the frontend), or send it to a backend service that resizes the image.

  • @yathishhosamani2837
    @yathishhosamani2837 Před 2 měsíci +1

    Thanks a lot