Log In | Register
Skip to main content
Topic: Uploading images and automatic resizing (Read 301 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.
Uploading images and automatic resizing
I'll do my best to answer the questions with how things are currently setup, we can adjust things to suit.  What I have set has shown to be a good starting point.

The size of a file that can be uploaded is 8M for an individual file and 16M for a group of files.  That means if you were to try and attach (4) 8M files to a post the server would reject that as 32M > 16M.  I can increase those values if needed, but 8M is a fairly large file.

Uploaded avatars are re-sized by the server to 240x240px, I think at a jpeg quality of 85%, your avatar stored as 16K.  This is done to keep them lite weight, you would not want to bring up a page view and have to download 20 1.8M images, it would be very slow.

If you use a URL to link to an avatar image, currently its just re sized on the screen, but its still a full sized image,  meaning if they link to a 1.5M image, its really that large.  Thinking about that, I need to change that behavior, we have the option to check the URL image, and if its to large, downloaded and re size it on the server.  That helps prevent someone making a mistake and linking to a large image.

Attachments (those added to a post) are held to a maximum size of 1280x1280px and use jpeg quality of 85%. 
- If an image is uploaded that is larger than that size it will be re-sized proportionally to fit in those limits (and the 8M limit)
- If an image is <1280x1280 but >8M the server will attempt to compress it (again 85%) to fit in that 8M size limit.
- The server may convert a .png to .jpg if the .png is to big WxH or raw size > 8M

If I recall correctly images in the media area are held to 1536X1536px

The  basic idea is to allow someone the ability to upload a large image, but have the server do the work of crunching it down to a size that will not consume a lot of bandwidth to view.  This allows for example, someone to take a picture with their phone and upload it without having to re size it first.