Resize linked image via BBcode?

Use this forum to ask questions about how to use this website, or to make any general comments about how it works
Post Reply
User avatar
Bosterson
Posts: 2317
Joined: May 18th, 2009, 3:17 pm
Location: Portland

Resize linked image via BBcode?

Post by Bosterson » January 7th, 2014, 9:56 am

I see that BBCode is on for the board. Is the image resizing code enabled? I'm linking in pictures from another site where for some reason the horizontal ones are smaller than the verticals, and I want to resize. It looks like BBCode should be able to do that via either [img height="600"] or [img=800x600] or [img h=600], but all of those kill the [img] tag. Is there a way to make it work?
#pnw #bestlife #bitingflies #favoriteyellowcap #neverdispleased

User avatar
kepPNW
Posts: 6411
Joined: June 21st, 2012, 9:55 am
Location: Salmon Creek

Re: Resize linked image via BBcode?

Post by kepPNW » January 7th, 2014, 10:25 am

In all my experiences, the only resizing occurring/supported here, is that all inlined images are clamped at 800px horizontally. I haven't found a way, other than use the differently sized options on Flickr, to control it otherwise. Having native support would be nice!
Karl
Back on the trail, again...

User avatar
Martell
Posts: 2045
Joined: May 28th, 2008, 10:03 pm
Location: SW Portland

Re: Resize linked image via BBcode?

Post by Martell » January 22nd, 2014, 11:20 pm

Believe it or not, it's not supported by phpbb3 natively.

I added a new bbcode rimg (resizable image). It allows you to specify a width and height, and if the image is clicked on it will pop open to a new tab.

Code: Select all

[rimg=width,height]url[/rimg]
http://www.portlandhikersfieldguide.org ... kers01.jpg
-Dan
Site Tech Helper

User avatar
Martell
Posts: 2045
Joined: May 28th, 2008, 10:03 pm
Location: SW Portland

Re: Resize linked image via BBcode?

Post by Martell » January 22nd, 2014, 11:24 pm

And also timg (thumbnail image) which allows you to just specify a width, for quick resizing:

Code: Select all

[timg=width]url[/timg]
-Dan
Site Tech Helper

User avatar
kepPNW
Posts: 6411
Joined: June 21st, 2012, 9:55 am
Location: Salmon Creek

Re: Resize linked image via BBcode?

Post by kepPNW » January 23rd, 2014, 6:15 am

Nice additions, Dan!

Wondering if the [timg] tag will allow photos wider than 800px now?



No go. Alright, let's try the resizer one...

http://farm3.staticflickr.com/2824/1202 ... 4fdb_o.jpg

Hmmm, okay, looks like 800px is still the clamping width. :lol:

Which is probably good, to avoid the dreaded hscrollbar! :)

Thanks...
Karl
Back on the trail, again...

User avatar
Martell
Posts: 2045
Joined: May 28th, 2008, 10:03 pm
Location: SW Portland

Re: Resize linked image via BBcode?

Post by Martell » January 23rd, 2014, 8:03 am

We could have a few different max widths based on your screen size...
-Dan
Site Tech Helper

User avatar
kepPNW
Posts: 6411
Joined: June 21st, 2012, 9:55 am
Location: Salmon Creek

Re: Resize linked image via BBcode?

Post by kepPNW » January 23rd, 2014, 8:26 am

Martell wrote:We could have a few different max widths based on your screen size...
Interesting idea. Not sure I'd agitate for it, though, if it meant needing to maximize a browser to avoid the horizontal scrollbar. (I'm one of those with dozens of overlapping, defiantly non-maximized, windows! :)) Most hosting sites make it real easy to link to a larger image, as do your new rimg/timg tags!
Karl
Back on the trail, again...

Lurch
Posts: 1270
Joined: May 28th, 2008, 10:03 pm
Location: Aurora
Contact:

Re: Resize linked image via BBcode?

Post by Lurch » January 23rd, 2014, 11:51 am

I'd generally avoid giving people control over both height and width, or they're going to skew the aspect ratio and images will get distorted.

Also don't forget that the full image needs to be downloaded even if you shrink it to a tiny display, so people load times will take just as long (if not longer) if people start to not resize their images independently..

User avatar
Bosterson
Posts: 2317
Joined: May 18th, 2009, 3:17 pm
Location: Portland

Re: Resize linked image via BBcode?

Post by Bosterson » January 27th, 2014, 12:52 pm

Cool, Dan! Thanks! :D
#pnw #bestlife #bitingflies #favoriteyellowcap #neverdispleased

Post Reply