Resizing images using HTML code

Words
186
Reading
1 min
Listen
Play
8y

Yesterday I was experimenting with some HTML code on Steemit so I decided to make a post about resizing pictures/images on Steemit using simple HTML. I was searching through some older posts and I couldn't help but notice that some of their previous methods don't work on todays platform.

image

To keep it simple

When you upload your image you'll should get something like this:

image

First case scenario is if you upload through app and the second one is if you upload through browser. Solution to both of the cases should be the same:

  • First step is to delete ![image] or ![image.png] part, as well as the brackets '(' and ')' which contain your URL of the image. Your image URL is now free.

    image

  • Second step is to add your image URL to HTML code <img src=" your URL " style="width:wanted width in pixels px;height:wanted height in pixels px;"

image

If you have done this correctly then your image will be resized to 500x500px (or whatever size you wanted).
For example, this is 300x200px image:

image

This is the same image with attributes "width:200px;height:300px;":

I'm not really sure if this will work in browser because my preview stays the same no matter what I do with the pictures. I've tried to add div properties but I didn't get much result. If someone figures out the problem, please feel free to write it in the comment section.

Resizing images using HTML code | Ecency