WordPress.org

Ready to get started?Download WordPress

Forums

maximum image size (29 posts)

  1. formpig
    Member
    Posted 3 years ago #

    is there a way to globally set a max image size for posts and does anyone know what the Maximum Embed Size is that is set in Settings > Media?

    Thanks.

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    to globally set a max image size I guess you would set it in settings->media under the large image size. That would be the biggest size

    And maximum embed size is the largest size an embedded media object would appear on your screen. I usually just set a width of appropriate size for my theme's post area

  3. formpig
    Member
    Posted 3 years ago #

    Hi Reverend Voodoo.

    Thanks.

    Can I ask you to please drop a little more good mojo on this post?

    I have also been setting just the width in this section for the large image size. I have also tried this with the Thumbnail size (by setting just the width or just the height) and my thumbnails are all getting stretched.

    If - say - I set the maximum image size to something like 400 for a width - and I see images that show up on my site that are larger than this, does that mean there is a bug somewhere?

    I don't believe I am able to get this setting to work globally on either large images or on thumbnail images...

    Thanks!

  4. FishDogFish
    Member
    Posted 3 years ago #

    @formpig

    Your images are stretching because you're setting them disproportionately.

    You have to adjust both height and width proportionately. The easiest way to do that is to increase or decrease their height and width by a certain percentage, that way the image/s still look right after resizing.

    Use a calculator, just find the width and height of the image then multiply each of those by 70% or 0.7 for example, and that will reduce the images height and width by 30%.

    Also you can set the images max width by putting this $GLOBALS['content_width'] = 600; in your functions.php file. Change the 600 to whatever you want the width to be.

    The height should scale proportionately.

  5. formpig
    Member
    Posted 3 years ago #

    Hey Fish.

    A big huge thanks.

    Thank you for the functions.php info. I have been able to get the post images resized by going into the Edit Post, selecting the image edit icon and going to the Advanced Tab.

    Can I please ask you if there is a reason why setting the /width/ on the Settings > Media section for Large at 600 and the height at nothing - won't do the same thing as the functions.php edit?

    Also, more importantly -

    are you using the "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" checkbox?!! It seems to me that having this UNCHECKED will always cause your thumbnails to get stretched unless you size them individually (which I really don't want to have to do). I just want to set a height or a width that they all conform to. Does this make sense?

    But this does not work when I try and set a height only to 150 (no width) or a width only to 310 (no height).

    If I am following you correctly the point is that I don't have images that are all the same size or all the same proportionally (width to height). They are all different and I just want them to all show up as thumbnails /either/ with a constant height or with a constant width.

    Does that make sense??

    THANKS.

  6. FishDogFish
    Member
    Posted 3 years ago #

    Can I please ask you if there is a reason why setting the /width/ on the Settings > Media section for Large at 600 and the height at nothing - won't do the same thing as the functions.php edit?

    It depends, since you were having trouble with your images sizing correctly I thought your theme might not be scaling them. The code I showed you would fix that.

    But it looks like you were just tampering with the settings, and that was causing the problem.

    are you using the "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" checkbox?!! It seems to me that having this UNCHECKED will always cause your thumbnails to get stretched unless you size them individually (which I really don't want to have to do). I just want to set a height or a width that they all conform to. Does this make sense?

    I've never unchecked it for the same reasons you mentioned.

    But this does not work when I try and set a height only to 150 (no width) or a width only to 310 (no height).

    If I am following you correctly the point is that I don't have images that are all the same size or all the same proportionally (width to height). They are all different and I just want them to all show up as thumbnails /either/ with a constant height or with a constant width.

    If you set the width in the functions.php, then the height will be adjusted proportionately.

    For example, if you have an image that is 1200 X 880 and you set a width of 600, then the image will be scaled to 600 X 440

    I've never tested how different sized images are scaled, but I'm almost 100% sure that they will be scaled just as I explained above.

    The only factor is; What percentage of the original image width is 600, once the code cruncher determines that it scales the width and height by that percentage, so different sized images will come out different heights.

    What I do is start with a full sized image, since I create my own images using my cam I know I have images that are all the same size. Then I load them into a graphics program and scale them down to the desired size using a percentage. That way all my images appear uniform in size on my blog.

    Width is my primary concern, with performance being second, I don't want images that are bigger than the screen when clicked on, because they take up more of everything.

    The rare exception to my images being uniform in size is when there is some detail that I want to show, and some undesired something in the same shot, and I have to trim the image slightly to get rid of the undesired bit, but the difference is so slight it's hardly noticed.

  7. formpig
    Member
    Posted 3 years ago #

    Hi Fish.

    I have two issues. I will take your suggestion on resizing the blog images but would like to deal with this later.

    For the moment I am more concerned with the thumbnail issue because I have been trying to troubleshoot this for something like two weeks and it appears to me there is some conflict within the theme.

    I have set the Settings > Media as suggested in the instruction.html for F8 Static. The thumbnails are to be set at 310w x 150h. They are set like this. I have checked the crop checkbox and now have the following:

    http://formpig.com/blog/category/architecture/

    All the images here are now showing up at the correct size (no stretching) but they are being cropped. There must be something better that can be done here. If you scroll down to the bottom there is a portrait of a guy and all we see is his beard. This looks ridiculous.

    Are we saying that either my THUMBNAILS in this theme are going to get stretched /or/ they are going to get cropped?

    This is supposedly a photographic theme and this seems ridiculous. I mean, I don't want to be a wiseguy or to complain but I mean, why don't we have the text stretched while we are at it.

    I guess what I am hoping to find out is if it is possible in this theme to not have the thumbnail images cropped in this manner and to not have them stretched. I've spent a lot of time perfecting the site with the expectation that this could be solved and it seems sort of ridiculous that this can't be solved.

    Is there a totally different way to display thumbnails that I should be trying...?

  8. FishDogFish
    Member
    Posted 3 years ago #

    The image of "professor Reuleaux" is showing in it's full size. If you view the full image you'll see that the image on your page and the full image are exactly the same size.

    What is ridiculous about that?

  9. formpig
    Member
    Posted 3 years ago #

    I know. But I am saying that the crop for the Thumbnail looks totally ridiculous.

    I want to have some control over how the thumbnails display so they don't either crop or stretch. i want them to just show up as thumbnails like - well - normal...

  10. formpig
    Member
    Posted 3 years ago #

    Hey Man.

    Here is what I see for the thumbnail for this image. It looks totally ridiculous.

    http://www.formpig.com/image/fishdogfish.png

    Can't this be fixed somehow??

  11. FishDogFish
    Member
    Posted 3 years ago #

    You want them to scale. You want them to look exactly like the larger image only smaller.

    Here's what it says in the "Settings"

    "Crop thumbnail to exact dimensions (normally thumbnails are proportional)"

    Above that there are boxes where you enter the height and width for the thumbnail, if you enter values there, and check the box beside the text I pasted above, then your thumbnails will be that size.

    If you don't crop the thumbnails to exact size, then they will be proportional, which means they'll look exactly like the larger image only smaller. Providing the larger image is actually Larger, as in not exactly the same size as you have your thumbnails set to, like you do.

    What other control over the thumbnails would you like to have?

  12. FishDogFish
    Member
    Posted 3 years ago #

    Here is what I see for the thumbnail for this image. It looks totally ridiculous.

    I'm seeing the same thing. If you right click on the image, and select view image it will load the full image. The full image is exactly the same size as the thumbnail, which means you're uploading thumbnails as images, and displaying thumbnails of the same size as the uploaded images.

    Are you aware of that?

  13. formpig
    Member
    Posted 3 years ago #

    Hi. Thanks.

    "You want them to scale. You want them to look exactly like the larger image only smaller."

    Yes.

    "Above that there are boxes where you enter the height and width for the thumbnail, if you enter values there, and check the box beside the text I pasted above, then your thumbnails will be that size.

    If you don't crop the thumbnails to exact size, then they will be proportional, which means they'll look exactly like the larger image only smaller."

    This does not work in F8 Static and there is either no attention to this issue from the developer and/or the Mods. It is also possible they have not understood what I am saying.

    This is not working in F8 Static. If I "leave" the Thumbnail settings at 310x150 and uncheck this box the images are 310x150 and stretched. There is no other setting in the thumbnail dialog boxes that changes this. The only change with thumbnails in this theme is to check the crop box and you get what I show in the earlier image.

    It /should/ be possible to show these as unstretched and uncropped thumbnails but it is not...

    This is what I am asking to be able to do and I have not found settings in this theme that allows for this.

    What other control over the thumbnails would you like to have?

  14. formpig
    Member
    Posted 3 years ago #

    the thumbnail settings in Setting > MEDIA are 150 x 310 for thumbnails as suggested in the instructions.html for this theme.

    I don't understand if you are suggesting that there should be another set of settings somewhere that I need to also change.

    None of this really makes sense to me.

    I have to assume that since the F8 Static docs /tell/ me to set the thumbnails at 150x310 - and they tell me /not/ to set a height for Medium or Large images - that this them ONLY will display thumbnails as either stretched or cropped.

    Does that make sense?

    I DO want to display them unstretched and uncropped - like mini versions of the actual post images - but i don't think I can and mods keep telling me that I need to post larger images which does not seem to be the issue.

    It would be nice to get something definitive on this from WordPress. I've only been trying to solve it for two weeks now.

  15. FishDogFish
    Member
    Posted 3 years ago #

    The images are not showing as stretched or cropped, they're showing as the exact same size as the images you have in your media library.

    What is F8 Static?

  16. formpig
    Member
    Posted 3 years ago #

    hey man. sorry for the multiple posts.

    "The full image is exactly the same size as the thumbnail, which means you're uploading thumbnails as images, and displaying thumbnails of the same size as the uploaded images. Are you aware of that?"

    What do you mean by this?

    "displaying thumbnails of the same size as the images."

    How do I make thumbnails display as thumbnails?

    "uploading thumbnails as image"

    how do I upload thumbnails as thumbnails? Or do you mean you want me to upload larger images??

    Thanks

  17. formpig
    Member
    Posted 3 years ago #

    Hi. I'm not concerned with the images.

    I am concerned with the thumbnails that are getting cropped or stretched:


    http://www.formpig.com/image/fishdogfish.png

    I just want to find out if this can be prevented...

  18. FishDogFish
    Member
    Posted 3 years ago #

    Yes, you should be uploading larger images, unless you only want to show thumbnail sized images.

    If you have a thumbnail sized image in a post, and that image is linked to the original image you can click the thumbnail and view the full sized image.

    In your case; However, you'll be viewing the image in the same size as the thumbnail, which is a useless and redundant method of displaying images. I mean why click on a thumbnail only to view it again in the same exact size?

    Are you uploading 310 X 150 images? or is F8 Static resizing your uploads?

  19. FishDogFish
    Member
    Posted 3 years ago #

    Hi. I'm not concerned with the images.

    I am concerned with the thumbnails that are getting cropped or stretched:

    Sorry, but I don't see any thumbnails being cropped or stretched. :/

  20. formpig
    Member
    Posted 3 years ago #

    Hi. Thanks.

    The link posted above shows part of the image of franz reuleaux as a /cropped/ thumbnail. All we see is the guys beard.

    This thumbnail is being cropped.

    If I uncheck the crop checkbox this image will instead be stretched...

    No?

  21. formpig
    Member
    Posted 3 years ago #

    all the images in this screenshot are thumbnails that are being cropped:

    <a href="
    http://www.formpig.com/image/fishdogfish.png">http://www.formpig.com/image/fishdogfish.png

  22. FishDogFish
    Member
    Posted 3 years ago #

    O.K. here are your image sizes, the first one is the full image(only shows that way in IE, Firefox shows it the same as the thumbnail).

    The second is your thumbnail.

    formpig_professor-franz-reuleaux_zopke-218x300.png

    formpig_professor-franz-reuleaux_zopke-310x150.png

    You have a bit of a dilemma; Don't you?

  23. FishDogFish
    Member
    Posted 3 years ago #

    The link posted above shows part of the image of franz reuleaux as a /cropped/ thumbnail. All we see is the guys beard.

    This thumbnail is being cropped.

    If I uncheck the crop checkbox this image will instead be stretched...

    No?

    I don't know, I haven't view it that way.

    If you have your theme set to "Scale" your images, then it will be whatever width you have set in the functions.php, and the height will be proportional to that.

    So you should see the entire image only a scaled version if the original is larger, or larger if the original is small than the width you set.

    If you would set your blog so that it stretches I could see what you mean if it's showing up live. All I have seen though is the png you posted with the professors head cropped off, which tells me you have a height limit on the thumbnail view, otherwise, since the image is taller than it is wide, it would display a taller image with the professor's head intact.

  24. FishDogFish
    Member
    Posted 3 years ago #

    Try setting this $GLOBALS['content_width'] = 218;

    And leave the checkbox unchecked.

  25. FishDogFish
    Member
    Posted 3 years ago #

    You might find a plugin that will help.

    Or you can write your own PHP to scale your thumbnails proportionately and display them correctly regardless of size differences.

    Here is a link to the Codex for image downsizing. You'll probably want it modified as below to get a thumbnail image.

    I wish I were better at PHP, then I could tell you how to implement it into your theme. You might already be a step ahead of me though, good luck.

    function wp_get_attachment_thumbnail_url($id){
     $thumbnail_array = image_downsize( $id, 'thumbnail' );
     $thumbnail_path = $thumbnail_array[0];
     return $thumbnail_path;
    }
  26. Littlejenny
    Member
    Posted 3 years ago #

    are there any problems if i upload 310 X 150 images :-?

  27. formpig
    Member
    Posted 3 years ago #

    Hi Fish,

    Thanks so much for your help. I want to really communicate that I appreciate your help on this.

    OK if I study this in the next day or so and see if I can make progress with it?

    (Can I just ask you now if I am correct in thinking that you upload your images /once/ and then use the WP interface (or the PHP code) to then have this /one/ image show up in different places in the Theme, right? I mean, you don't ever upload two sets of images - one for the thumbnail and one for the larger post image...)

    Thanks!

    - Jonathan

  28. formpig
    Member
    Posted 3 years ago #

    Hi Fish,

    Thanks so much for your help. I want to really communicate that I appreciate your help on this. OK if I work on this in the next day or so and see if I can make progress with it and then post back?

    In the meantime I am going to switch the site to not crop images and you can see the stretching behavior of this theme.

    Thanks!

    - Jonathan

  29. formpig
    Member
    Posted 3 years ago #

    Hi Boss.

    Thanks again a ton. Sorry for all the back and forth.

    I have unchecked the Crop box and resampled the thumbnails.

    These are now showing up as stretched instead (of cropped) the Category lists.

    Looks like one of the mods has been kind enough to be willing to get in to my site and see if something is going on or if this theme has to /either/ stretch or crop thumbnails (which still seems bizarre if not an outright bug).

    Will post back as I am sure there is a tone about this issue that I am not quite up to speeed on.

    Again a ton of thanks as I try and get this perfected.

    - Jonathan

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.