TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,236
  • Total Topics: 21,353
  • Online today: 340
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 221
  • Total: 221

Auto resize images on portal?

Started by Swifty550, March 14, 2012, 06:07:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bloc

True.

The downloads part of TP does have some resizing routines..I used them to make thumbnails of uploaded images. But SMF has also its own routines for that, which is used for attachments and their thumbnails, TP or other scripts *could* use them in combination with a setting - so they don't resize on every page-load.

Using CSS or javascript is of course easier..but not optimal, as you still downloads the "bigger" image, just resizing in browser.

Swifty550

Quote from: bloc on March 15, 2012, 08:23:17 AM
Using CSS or javascript is of course easier..but not optimal, as you still downloads the "bigger" image, just resizing in browser.

I guess going this route is not an easy job?

Would be nice to have the feature in TP. :(

lurkalot

Quote from: bloc on March 15, 2012, 08:23:17 AM

Using CSS or javascript is of course easier..but not optimal, as you still downloads the "bigger" image, just resizing in browser.


Resizing in browser would be fine I guess, as long as there's not too many really big images.  Freddy built me a poll block Here which I use on my front page, it resizes on the fly. I use it for my members weekly competition poll.  http://cameracraniums.com second block down in the middle. ;)

bloc

Yes, its not that bad if you keep the 2 sizes not too far apart ans its only a block with a few images.. But it can make a difference if you have 15 browser-resized originals on the frontpage. You will notice that.

Thats why actually making a smaller size in the first place will be better, page loads faster and you save some bandwidth(I know, broadband is common these days, but if everyone just makes big sizes on..whatever, even broadband will be slow).

Whether its to be added to TP is up to the team of course, and prob. not before a future version beyond v1.0.

G6Cad

Also big size images will eat your server BW rater quickley if you have a big forum with a lot of visitors.
I always run my photos in PS and save them for web before i upload them, often as 1024/768 format
When you save them for web in PS they will still have the great sharpnes to them, but very reduced in size.

If you take this images as an example, from start it is 6mb in size and format 2300x1800
Here it's been resized to 1000x600(something) and it's 107kb in size and still keep the sharpness to it.

Maxx1

Just some consideration, about images.. like mention above they do take up space and load down the server, unless you use like another sites storage space for them.

If you want to run photos on you site they should be done using some sort of limitations. in size disk space and using server compression tools such as GDZ or ImageMadgick and other such tools, this along with a directory / folder they will be filed in Like done with some gallery mods.

It not 0only the server that get loaded down but most host on allow a certain amount of DB space, and bandwidth.

So there are more one consideration here. Somethings are very neat and look very nice but, if and when your site goes, to over 100 users at a time , you may find you site stuck in the twilight zone! due to overload!.. Even with a gallery and compression tools this will slow down and or stall your site, unless your paying big bucks!

Just a thought or two!

regards,
maxx
But Mama, That's Where all the fun is!

lurkalot

Quote from: G6Cad on March 15, 2012, 11:52:42 AM

I always run my photos in PS and save them for web before i upload them, often as 1024/768 format
When you save them for web in PS they will still have the great sharpnes to them, but very reduced in size.


You mean you resize them using the "save for web" option?  That's fine, but normally it strips out the EXIF info when using that method.  That's fine for a personal gallery, or web graphics etc, but not for a photographic community situation, as that info is valuable.  ;).

ZarPrime

Quote from: Swifty550 on March 14, 2012, 11:27:20 PM
From looking, they use a portal.js file with this code?

It seems when on the front page it adds a temporary size of 300x300. Would be good if you guys could take a loot please. :)

I've looked at the code and I see what they are doing.  Of course, there is more to this than just the javascript, in other files of course, though it seems that it can't really be adjusted to a size of the user's choice but is static at 300px by 300px.  However, there is still the consideration of what kind of a load doing something like this would add to the site's server and the user's local computer, especially for a large site.

Quote from: bloc on March 15, 2012, 10:46:03 AM
Yes, its not that bad if you keep the 2 sizes not too far apart ans its only a block with a few images.. But it can make a difference if you have 15 browser-resized originals on the frontpage. You will notice that.

Thats why actually making a smaller size in the first place will be better, page loads faster and you save some bandwidth(I know, broadband is common these days, but if everyone just makes big sizes on..whatever, even broadband will be slow).

Whether its to be added to TP is up to the team of course, and prob. not before a future version beyond v1.0.

This is the exact reason why I don't think it's that great of an idea.  It probably wouldn't be too bad for one page of 15 images on the FrontPage but, as more and more topics are added that are promoted to the FP, the number of images that will have to be resized will multiply geometrically.  After a while, loading the FP would slow to a crawl as more and more images would have to be resized before the browser even gets them.  Combine that with doubling up on the number of images and the space to store the double images will get used up faster and faster.  Of course, a function could theoretically be written to unload the smaller images when they are no longer needed for the FrontPage and then delete them from the server, but that could conceivably cause massive lags to occur on the site as it increases in size.

Quote from: lurkalot on March 15, 2012, 06:00:18 PM
You mean you resize them using the "save for web" option?  That's fine, but normally it strips out the EXIF info when using that method.  That's fine for a personal gallery, or web graphics etc, but not for a photographic community situation, as that info is valuable.  ;).

Lurkalot makes a good point about photos, that's for sure.  My thinking on this goes back to my suggestion from earlier, especially if a user has something like Highslide installed.  Let SMF resize the images one time at the very beginning (300px X 300px), make your users aware that any image can be enlarged with Highslide just by clicking the image, and let it ride.  Setting the maximum width and height of the images in both topics and on the FP would be much easier on the server and, in most cases, it would make no difference to your members.

ZarPrime

lurkalot

Believe it or not, on one of the other photography forums I've been moderating for about five years, it's a Future Publishing site, called Photo Radar (formally Digital Camera Magazine)

We actually had someone complain that he couldn't upload a 66MB Raw Neff file to the galleries. lol.. :uglystupid2:

Really Sorry Swifty550, I seem to have hijacked your thread.  :-[ That said, it, it doesn't hurt to discuss these things, some good might come of it.  ;)


ZarPrime

Quote from: lurkalot on March 15, 2012, 08:54:46 PM
We actually had someone complain that he couldn't upload a 66MB Raw Neff file to the galleries. lol.. :uglystupid2:

<Oh My Gosh> That's crazy :idiot2: and somewhat silly as well. ::)

ZarPrime

This website is proudly hosted on Crocweb Cloud Website Hosting.