News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Setting maximum image size in pixels for upload

Started by EL34, May 10, 2014, 08:50:54 AM

Previous topic - Next topic

EL34

I did a search but did not find exactly what I was looking for

I have set the max width and height of posted pictures to 1024 wide and 800 high in
» Administration Center » Features and Options » Layout

Then I tested it by attaching a 1600 x 900 .gif file and the file uploaded
When clicking on the thumbnail a new window opens up with the image displayed and that window is approx 1544 x 846 pixels
The image in that window has horizontal and vertical scroll bars
So the image is still displaying a larger pop up window than 1024 wide x 800 and the image in that pop up is still 1600 x 900

I am confused as to what the setting here are actual for?
» Administration Center » Features and Options » Layout >> max width and max height

I have already set the max upload attachment sizes in KB, but can I set max image upload height and width?

I would like to restrict uploaded images to 1024px wide if possible and displayed images to 1024px
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

Illori

do you want to change the size of attachments or images embedded into a post?

EL34

Quotedo you want to change the size of attachments or images embedded into a post?

Both really

I would like to have a pixel size limit of 1024 width x 800 height on uploads to the server
and I would like that to be the max that can be viewed in messages.
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

Illori

the layout page is for images embedded into a post, not for attachments. this also does not effect images already linked to in existing posts.

to change attachments look in the attachments section of the admin panel.

Arantor

Except the setting can actually be used by both under some circumstances...

EL34

Yes thanks but the settings in

» Administration Center » Attachments and Avatars » Attachment Settings

are for attachment sizes in KB, not for image max pixel sizes.
You can my setting in that screen below

I want to limit the upload size in Pixels and limit the display size in post in pixels

Check out post #1 again please if you need more info
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

radu81

sorry for my bad english

EL34

Thanks radu but reading the last few post from that mod leads me to believe it has been abandoned
I don't mind installing mods but if the author is not active I back away

I still have the question for post #1
QuoteI have set the max width and height of posted pictures to 1024 wide and 800 high in
» Administration Center » Features and Options » Layout
Then I tested it by attaching a 1600 x 900 .gif file and the file uploaded

So if I was able to upload the 1600 x 900 image and it displayed larger than the 1024 x 800 max I set, what is that setting for?
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.19

airdave

I have this same question...and I have the same problem.

I have limited image size to 800px wide.
I think this is big enough to see whats going on, and still fits on everyone's screen!
It also helps limit file sizes in attachments.

But it doesn't seem to work.
I've got people posting embedded images (remote direct linked inline images)
and they appear at their original source size...1200px, 1400px wide.
I need these images auto resized.

Also, while I have limited Image size in the Attachment options (to 200kb each, 800kb max per post )
this still does not control the image size in pixels.
At low res, you could still add a 1600px image!)


drewactual

Quote from: airdave on October 01, 2019, 09:45:04 AM
I have this same question...and I have the same problem.

I have limited image size to 800px wide.
I think this is big enough to see whats going on, and still fits on everyone's screen!
It also helps limit file sizes in attachments.

But it doesn't seem to work.
I've got people posting embedded images (remote direct linked inline images)
and they appear at their original source size...1200px, 1400px wide.
I need these images auto resized.

Also, while I have limited Image size in the Attachment options (to 200kb each, 800kb max per post )
this still does not control the image size in pixels.
At low res, you could still add a 1600px image!)



add to your themes css file, at the bottom:


.post img  {
               max-width: 800px; /*or the width you want to set as max*/
               height: auto;
      }


or if you want to dress it up even more (appearance) get jiggy with it:


.post img  {
               max-width: 800px; /*or the width you want to set as max*/
               height: auto;
               border: 1px solid #ccc;
               border-radius: .5em;
               box-shadow: 3px 6px #eee;
      }

Antechinus

Even simpler:

.bbc_img {
    max-width: 95%;
    height: auto;
}


That will cover all images in posts, news, sigs, attachments, whatever.

Advertisement: