If you need the image to be a certain size or just need to shrink it, you can add in attributes to change the size of the image.  Remember that changing the height and weight in the code will not keep the image in the same proportions automatically, so make sure that if you put in a different size that it will not distort the image.  Using this method will not change the file size of the image, for more information on helping your page's load time by decreasing the file size of images please read our article on helping your images load faster.

We will start with our code from the last section:

<img src=&quot;Images/image.jpg&quot; align=&quot;middle&quot;>

To change the width and height of the image, you will need to use the width and height tags:

  • width="___"
  • height="___"

Now we will insert the tags into our code, putting in the width and height that we want the image to be (in pixels):

<img src=&quot;Images/image.jpg&quot; align=&quot;middle&quot; width=&quot;250&quot; height=&quot;320&quot;>

Remember that any time you add an attribute, make sure you use quotation marks around the value or it will not work properly. Also, the order of the attributes does not matter, you can also use:

<img src=&quot;Images/image.jpg&quot; width=&quot;250&quot; height=&quot;320&quot; align=&quot;middle&quot;>

The image will now be the size of the size of 250 x 320.

Did you find this article helpful?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.