Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: supernova777 on January 08, 2019, 07:28:05 PM

Title: question re: width + height of images
Post by: supernova777 on January 08, 2019, 07:28:05 PM
for a long while, most of the last 2 years, whenever i would paste in an image, whether i was linking to an attachment or to an external image
my site would automatically add width=MAX_WIDTH (the numbers i specified in my CONFIGURATION > FEATURES + OPTIONS > LAYOUT)
but now for some reason i guess i was changing some settings in my config.. and it has stopped doing this...
does anyone have any clues for me as to what has caused this to start/stop?
literally before anytime i saved my post and then edited it again, it had the widths added inside the [img] tag ie: [img width=MAX_WIDTH] like so
Title: Re: question re: width + height of images
Post by: GigaWatt on January 08, 2019, 08:03:43 PM
Stopped doing it completely, or just not doing it from time to time, depending on the size of the image, time of day, etc. (I'm hinting at server load/overload, because I had a similar problem)?
Title: Re: question re: width + height of images
Post by: drewactual on January 08, 2019, 08:09:45 PM
if you hard code it in your themes css file, you take a few calls off the server load and it happens with certainty.... just a thought...

add to your css:

.post .post inner img{max-width:xxx; height:auto; /*use auto so you don't distort image*/}