dnenb Posted April 5, 2014 Share Posted April 5, 2014 How do you limit the size of your players images? Quote Link to comment Share on other sites More sharing options...
sniko Posted April 5, 2014 Share Posted April 5, 2014 (edited) With CSS. See Fiddle <div id="PlayerSignature"> <img src="http://www.takequickbreak.com/wp-content/uploads/2013/08/02-airborne-penguin-exits-water_1600.jpg" width="10000px" height="100000px" /> </div> [css] #PlayerSignature img { max-height: 250px; max-width: 250px; } [/css] max-height browser support max-width browser support Have fun. Edited April 5, 2014 by sniko Added browser support information. Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted April 5, 2014 Share Posted April 5, 2014 If you have a bbcode engine. I believe you can code it in and make it have a limit of the size if it goes over the limit... If you mean the size of the picture. Send me your skype name. I will give you a code... Quote Link to comment Share on other sites More sharing options...
dnenb Posted April 5, 2014 Author Share Posted April 5, 2014 Works like I want it to - thanks sniko! Quote Link to comment Share on other sites More sharing options...
sniko Posted April 5, 2014 Share Posted April 5, 2014 Works like I want it to - thanks sniko! You're welcome. Quote Link to comment Share on other sites More sharing options...
Script47 Posted April 5, 2014 Share Posted April 5, 2014 With CSS. See Fiddle <div id="PlayerSignature"> <img src="http://www.takequickbreak.com/wp-content/uploads/2013/08/02-airborne-penguin-exits-water_1600.jpg" width="10000px" height="100000px" /> </div> [css] #PlayerSignature img { max-height: 250px; max-width: 250px; } [/css] max-height browser support max-width browser support Have fun. Penguins... Always the penguins! :D Quote Link to comment Share on other sites More sharing options...
sniko Posted April 5, 2014 Share Posted April 5, 2014 Penguins... Always the penguins! :D :) Yep. They are awesome. Quote Link to comment Share on other sites More sharing options...
Dave Posted April 7, 2014 Share Posted April 7, 2014 How do you limit the size of your players images? I'd also suggest limiting the size or you're going to make your site struggle to download all the assets. I'd run the image through the following function: http://uk1.php.net/getimagesize Here you could also check the width and height server side before even allowing the user to upload the image. Quote Link to comment Share on other sites More sharing options...
dnenb Posted April 7, 2014 Author Share Posted April 7, 2014 I'd also suggest limiting the size or you're going to make your site struggle to download all the assets. I'd run the image through the following function: http://uk1.php.net/getimagesize Here you could also check the width and height server side before even allowing the user to upload the image. I'm just letting them use external images. Is there a way of checking the image size without downloading the image to my server? Quote Link to comment Share on other sites More sharing options...
sniko Posted April 7, 2014 Share Posted April 7, 2014 I'm just letting them use external images. Is there a way of checking the image size without downloading the image to my server? I'm pretty sure getimagesize works remotely (IIRC). If not, download the file into a temporary file, and check there, then remove the temporary file after you're finished with it. Quote Link to comment Share on other sites More sharing options...
Arslan230 Posted June 26, 2014 Share Posted June 26, 2014 How much I can increase the size? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 26, 2014 Share Posted June 26, 2014 How much I can increase the size? I don't really think there is a limit to the size that you can do. But my question is why would you want to increase the size? The best thing is to use some sort of standard for your image because increasing it too much may distort the image and it will look like trash. Maybe have a look here and you can come up with a way to fit your needs: http://www.codediesel.com/php/fixing-aspect-ratio-of-images-in-php/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.