Resize and Compress Images in HTML CSS & JavaScript | Resize Image in JavaScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024

ความคิดเห็น • 62

  • @CodingNepal
    @CodingNepal  ปีที่แล้ว +11

    After watching this video, you'll know how to resize and compress the image on the front end by using vanilla JavaScript.
    Don't forget to check out the live demo of this Image Resizer. Link is in the description!

    • @redaloui
      @redaloui ปีที่แล้ว +1

      Any thaugts about how to design and create UI Kits using bootstrap, but a beautifull one

  • @ashishpatel6078
    @ashishpatel6078 ปีที่แล้ว +8

    You are really very skilled in JavaScript..
    Thank you so much sir..
    Keep uploading JavaScript video.
    Love from india 🇮🇳

  • @rio122
    @rio122 ปีที่แล้ว +1

    wow amazing,I thought you were using the API, but you weren't. You're just using pure Javascript.
    wow awesome 👍This is a motivation for me who is a beginner

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว +2

      Yes, my 99.9% JavaScript videos are created with vanilla JavaScript. Don't forget to checkout the playlist: th-cam.com/play/PLpwngcHZlPadhRwryAXw3mJWX5KH3T5L3.html

    • @NOTHING-yu3ry
      @NOTHING-yu3ry ปีที่แล้ว +1

      @@CodingNepal yes that's true and soo good

  • @fatihdemirkan4906
    @fatihdemirkan4906 ปีที่แล้ว +2

    What a cool process, i really liked it. Thanks a lot!

  • @ishangadineth
    @ishangadineth ปีที่แล้ว +3

    Your coding skills are really excellent. Can you make a video on how to make a youtube video downloader website like y2mate?

    • @allgameplay4188
      @allgameplay4188 ปีที่แล้ว

      Use python 👍

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว +3

      I don't think TH-cam will allow me to upload video on this topic.

    • @jhmesseroux
      @jhmesseroux ปีที่แล้ว

      @@CodingNepal we can not use the same logic to do that ??

  • @Bajoels
    @Bajoels ปีที่แล้ว

    Thanks for this tutorial sir...

  • @rohansingla4270
    @rohansingla4270 ปีที่แล้ว +1

    Great Work bro as always

  • @jorgeluisarteaga4282
    @jorgeluisarteaga4282 ปีที่แล้ว

    Why did you only declare the first constant with "const", but the following ones did not?

  • @mohammedelhoussni
    @mohammedelhoussni ปีที่แล้ว

    This tutorial is amazing thank you

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว +1

      You're very welcome!

  • @tuna_yag
    @tuna_yag ปีที่แล้ว

    I think reducing doesnt work. I have tried from the link you shared and it's not working. Can you check out please? Thank you.

  • @sebutnamakak9918
    @sebutnamakak9918 ปีที่แล้ว

    How can we custom crop images before uploading

  • @NOTHING-yu3ry
    @NOTHING-yu3ry ปีที่แล้ว +1

    Super bro

  • @mdms4549
    @mdms4549 ปีที่แล้ว

    Very Awesome This is perfect!

  • @Xonae-BlockmanGo
    @Xonae-BlockmanGo ปีที่แล้ว

    how can i add java ??
    BTW THX FOR HELP
    YOU DA BEST😀

  • @tinkugupta1
    @tinkugupta1 ปีที่แล้ว

    Can you make add cm inches and format jpg in this project so that we download on the basis of these setting

  • @adityaverma216
    @adityaverma216 6 หลายเดือนก่อน

    Pls give the github link or code for the above project

  • @innocentnwafor4396
    @innocentnwafor4396 ปีที่แล้ว

    You couldn't have made this at a better time. Looking to build a project similar to screely.c

  • @autogere
    @autogere ปีที่แล้ว

    Good! Very good!

  • @koushiksarkar1999
    @koushiksarkar1999 ปีที่แล้ว

    I want any size compressor please make it .. like 5 mb img convert 20kb instant

  • @rajnishkumar1791
    @rajnishkumar1791 ปีที่แล้ว

    Awesome ❤️❤️

  • @Mecoloji
    @Mecoloji ปีที่แล้ว

    Thank you!

  • @thhuyen02
    @thhuyen02 ปีที่แล้ว

    Nice

  • @alejandroalonso602
    @alejandroalonso602 ปีที่แล้ว

    No oculta input file con atributo hidden

  • @shri7559
    @shri7559 ปีที่แล้ว

    Can you share the github link please?

  • @getsetalk
    @getsetalk ปีที่แล้ว

    How can we make file downloading progress bar in javascript

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว +1

      Here is the video th-cam.com/video/_xDCVt1F6O0/w-d-xo.html

    • @getsetalk
      @getsetalk ปีที่แล้ว

      @@CodingNepal No , sir i know this but i want how to show progress bar when I'm downloading some files from server

  • @jkr19
    @jkr19 ปีที่แล้ว

    Create a Working Contact Form in HTML CSS JavaScript & PHP not working
    Your message has been sent but, when I check my gmail there is no email

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว

      Please read the blog and the comment section of that topic. You may find your solution there.

  • @Skyral
    @Skyral ปีที่แล้ว

    the code is not on the webpage

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว

      It's uploaded. Get source codes from here: www.codingnepalweb.com/resize-and-compress-images-javascript/

  • @AnnopTunsomkid
    @AnnopTunsomkid ปีที่แล้ว

    I want the image file to be compressed before uploading it to the server. Can this be done?

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว

      Yes, you can compress image on the front end by using JavaScript and later you can send it to the server. In this video, I've shown it, but instead of downloading, you can send it to the server.

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว +1

      If you don't know how to upload file to the server.. Here is the video: th-cam.com/video/_xDCVt1F6O0/w-d-xo.html

    • @AnnopTunsomkid
      @AnnopTunsomkid ปีที่แล้ว

      @@CodingNepal I will wait for you to upload the this code.

  • @c0denet
    @c0denet ปีที่แล้ว

    Great

  • @GaneshKumar-xq6hl
    @GaneshKumar-xq6hl ปีที่แล้ว

    ye dekhene ke baad aise lag rha hai ki - mujhe toh kuch bhi nhi aata java script main
    koi suggest karo yaar kya dekhu java script strong krne ke liye
    tutorial dekh liya voh mat bolana
    thankyou

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว

      Don't lose hope. I recommend you to read MDN documentation and try to create different projects by yourself: developer.mozilla.org/en-US/docs/Web/JavaScript

  • @redaloui
    @redaloui ปีที่แล้ว

    🚀🚀🚀

  • @koushiksarkar1999
    @koushiksarkar1999 ปีที่แล้ว

    Source code link please

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว

      Get source codes from here: www.codingnepalweb.com/resize-and-compress-images-javascript/

  • @jfranz7807
    @jfranz7807 ปีที่แล้ว

    And if I want to save with the original name of the image, what do I have to omit?

    • @CodingNepal
      @CodingNepal  ปีที่แล้ว

      Follow the given steps to do it:
      1. Replace this line let ogImageRatio; with this let ogImageRatio, ogImageName;
      2. Inside previewImg onload function add this line: ogImageName = file.name.replace(/\.[^/.]+$/, "");
      3. Last, instead of new Date().getTime(); pass the ogImageName as a.download value
      We're creating ogImageName global variable and passing original filename to ogImageName. And last passing the ogImageName as a.download value.

  • @yvng4697
    @yvng4697 ปีที่แล้ว

    19:49

  • @dimasnytin
    @dimasnytin ปีที่แล้ว

    Nice