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

Поделиться
HTML-код
  • Опубликовано: 13 июн 2024
  • In this video, I've shown how to Resize and Compress Images using HTML CSS & JavaScript. In this image resize tool, the user can upload an image and resize its dimensions or compress its size by reducing the image quality.
    After watching the video, you'll know how to resize and compress the image on the front end by using vanilla JavaScript.
    Live Demo or Download Codes of this Image Resizer & Compressor
    www.codingnepalweb.com/demos/...
    Timestamps:
    0:00 Demo of this project
    1:52 HTML & CSS start
    10:57 JavaScript start
    12:44 Previewing selected image
    16:39 Showing width & height of an image
    18:14 Working on width & height inputs
    21:17 Working on resizing & downloading an image
    Second Channel - bit.ly/3aHNkru
    Website: www.codingnepalweb.com
    Facebook - / coding.np
    Instagram - / coding.np
    Music Credit:
    Deep Sea by Vendredi
    • Deep Sea - Vendredi (N...
    Something 'bout July (Instrumental) by RYYZN
    • Something 'bout July (...
    Ikson - We Are Free [Official]
    • #83 We Are Free (Offic...

Комментарии • 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 Год назад +7

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

  • @fatihdemirkan4906
    @fatihdemirkan4906 Год назад +1

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

  • @Bajoels
    @Bajoels Год назад

    Thanks for this tutorial sir...

  • @mdms4549
    @mdms4549 Год назад

    Very Awesome This is perfect!

  • @rohansingla4270
    @rohansingla4270 Год назад +1

    Great Work bro as always

  • @mohammedelhoussni
    @mohammedelhoussni Год назад

    This tutorial is amazing thank you

  • @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: ruclips.net/p/PLpwngcHZlPadhRwryAXw3mJWX5KH3T5L3

    • @NOTHING-yu3ry
      @NOTHING-yu3ry Год назад +1

      @@CodingNepal yes that's true and soo good

  • @autogere
    @autogere Год назад

    Good! Very good!

  • @Mecoloji
    @Mecoloji Год назад

    Thank you!

  • @rajnishkumar1791
    @rajnishkumar1791 Год назад

    Awesome ❤️❤️

  • @huyennguyenthithanh4561
    @huyennguyenthithanh4561 Год назад

    Nice

  • @NOTHING-yu3ry
    @NOTHING-yu3ry Год назад +1

    Super bro

  • @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 RUclips will allow me to upload video on this topic.

    • @jhmesseroux
      @jhmesseroux Год назад

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

  • @tinkugupta1
    @tinkugupta1 Год назад

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

  • @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 11 месяцев назад

    How can we custom crop images before uploading

  • @jorgeluisarteaga4282
    @jorgeluisarteaga4282 Год назад

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

  • @c0denet
    @c0denet Год назад

    Great

  • @koushiksarkar1999
    @koushiksarkar1999 Год назад

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

  • @adityaverma216
    @adityaverma216 3 месяца назад

    Pls give the github link or code for the above project

  • @Xonae-BlockmanGo
    @Xonae-BlockmanGo Год назад

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

  • @alejandroalonso602
    @alejandroalonso602 Год назад

    No oculta input file con atributo hidden

  • @redaloui
    @redaloui Год назад

    🚀🚀🚀

  • @shri7559
    @shri7559 Год назад

    Can you share the github link please?

  • @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: ruclips.net/video/_xDCVt1F6O0/видео.html

    • @AnnopTunsomkid
      @AnnopTunsomkid Год назад

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

  • @getsetalk
    @getsetalk Год назад

    How can we make file downloading progress bar in javascript

    • @CodingNepal
      @CodingNepal  Год назад +1

      Here is the video ruclips.net/video/_xDCVt1F6O0/видео.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.

  • @yvng4697
    @yvng4697 Год назад

    19:49

  • @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/

  • @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.

  • @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

  • @innocentnwafor4396
    @innocentnwafor4396 Год назад

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

  • @dimasnytin
    @dimasnytin Год назад

    Nice