Image Resizer set the Height or Width Tool

Great Online Tools
By -
0

Image Resizer Set the Height or Width Tool:

Here is the tool for an image resizer tool where users can set the height or width of an image. This tool allows users to input an image URL, specify the desired height or width, and resize the image accordingly. The style is colorful and responsive.
Image Resizer

Image Resizer

Resized Image

Features of Image Resizer Tool:

  • Image URL Input: Users can input the URL of the image they want to resize.
  • Width and Height Input: Users can specify the width or height (or both) of the modified image.
  • Resize Image Button: Clicking this button resizes the image as per the specified dimensions.
  • Resized Image Display: The resized image is displayed below the button.

How Wt works:

  • When the user clicks the "Resize Image" button, the resizeImage() function is called.
  • The function retrieves the image URL, width and height input values.
  • It checks if the required inputs have been provided and alerts the user if any inputs are missing or both width and height are specified.
  • Depending on whether width or height (or both) is specified, the function adjusts the CSS width and height properties of the image accordingly.
  • Finally, it sets the source attribute of the image to the given URL, which triggers the image to be loaded and displayed in the browser.

Post a Comment

0Comments

Post a Comment (0)