• Hello Guest, welcome to the initial stages of our new platform!
    You can find some additional information about where we are in the process of migrating the board and setting up our new software here

    Thank you for being a part of our community!

image scaling in posts

aussyvolvo

Will stalk for money
Joined
Jul 12, 2007
Location
South Australia
I upload images from my phone to twitter, then use the image link system here. But they end up huge. Is there a simple code to make the images show up at like 20% of the size, in this forum?
 
You can use an HTML tag to display the image and also resize it smaller by giving a percentage.

Example html tag using percent as size reduction. you can also give just a number instead that will shrink / enlarge to the pixel size you specify. But if you do that, you need to make sure you maintain the aspect ratio of the image.

You can leave out the "alt=" part as well. All it does is fill in text when you hover over the image. The real reason to use it is for screen readers for the sight impaired.

< img src = "http:// image-link-goes-here .jpg" alt="TYPE YOUR ALTERNATE TEXT HERE" height="20%" width="20%" >

Hover over the images of mikeP's finest moment to see the description of each:

<img src="http://www.pbase.com/towerymt/image/161948835.jpg" alt="img src 20%" height="20%" width="20%">

<img src="http://www.pbase.com/towerymt/image/161948835.jpg" alt="img src 40%" height="40%" width="40%">

<img src="http://www.pbase.com/towerymt/image/161948835.jpg" alt="img src 100%" height="100%" width="100%">

<img src="http://www.pbase.com/towerymt/image/161948835.jpg" alt="img src 110%" height="110%" width="110%">


<img src="http://www.pbase.com/towerymt/image/161948835.jpg" alt="445 pixels wide x 296 pixels high maintains proportions" height="296" width="445">

<img src="http://www.pbase.com/towerymt/image/161948835.jpg" alt="250 pixels x 250 pixels distorts the image" height="250" width="250">
 
<img src="https://pbs.twimg.com/media/Dqof1kLVsAAReQV.jpg" height="50%" width="50%">

that's a lot to remember, is there an easier way? plus doing the same % in height and width doesn't seem to scale evenly in the preview.
 
I still haven't found a non-EOL plugin for Dana to evaluate :oops:
Some image hosts have an option to reduce during upload but it can be a bit of a pain switching to and fro when you want different sized uploads.
 
that's a lot to remember, is there an easier way? plus doing the same % in height and width doesn't seem to scale evenly in the preview.

There is. Use imgur.com to host your images.

You can then add the following to the end of the image address, but before the ".jpg"

s = Small Square (90?90)
b = Big Square (160?160)
t = Small Thumbnail (160?160)
m = Medium Thumbnail (320?320)
l = Large Thumbnail (640?640) as seen in the example above
h = Huge Thumbnail (1024?1024)

Note that it resizes the largest dimension and retains proportions if you use t, m, l, or h. S and b make it square.

For example, I'll use this image address
https://i.imgur.com/vHrjtQT.jpg

h
vHrjtQTh.jpg


l
vHrjtQTl.jpg


m
vHrjtQTm.jpg


s
vHrjtQTs.jpg


Original
vHrjtQT.jpg
 
Back
Top