WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't fix image cropping problem with theme (13 posts)

  1. pixelpixie0521
    Member
    Posted 2 years ago #

    Hi everyone, I'm hoping someone can help me. I purchased my first theme to use for my Design portfolio website but from just viewing the demo page didn't realize that the image frame on the portfolio detail page would automatically vertically crop my images. This is a big problem for me as I have some vertical images that I need to include and its cropping my images all the way down to 290 pixels high.

    I've tried contacting the theme programmer several times and though he did respond the first 1-2 times and said he'd look into it, it has been several weeks now and he has not responded to any of my follow up messages. I have even messaged him and just asked if he could point me in the general direction to where in the code I'd have to look to fix this problem myself and still I've gotten nothing. I've tried looking through the code myself to see if I could figure it out and I can't seem to find it.

    I'm not sure if it's possible for anyone to help give me advice or suggestions on where to look without seeing the code itself (out of respect for the theme programmer I don't want to just post it up anywhere) but I would really appreciate it if I could get any help/advice. The code is just a bunch of php files and a css file. If it helps to see it, my site in its current state using the wordpress theme is at http://www.alexismillerdesign.com. Thanks in advance.

  2. cinghaman
    Member
    Posted 2 years ago #

    i am assuming that the code would be using standard wordpress upload and cropping up the thumbnails
    you can go check into settings > media and see different options

  3. cinghaman
    Member
    Posted 2 years ago #

    or if u want to modify the code
    Go to css
    add
    #main .container
    {
    overflow:hidden;
    }
    .single-portfolio .portfolio-thumbs img {
    display: block;
    height: 450px;
    }

    But this would stretch your image as at time of upload it is being cropped up.
    as you cannot go above width:640px (due to your container's fixed width)

  4. pixelpixie0521
    Member
    Posted 2 years ago #

    Thanks so much for your replies Robin. I've looked into both of your suggestions.

    When I went into settings>media though it showed that large images would upload at 1024x1024 which is huge, bigger than needed. And I went back in and looked at the actual upload image menu/area and it shows that I'm uploading the images at "Full size", for instance I looked at one of the images and its 660x562.

    Then I tried putting your code into the css file and it worked like you said, it just stretched my images and cropped them. But it did give me hope that somehow it is possible to increase the height of the box holding these images, so thank you for that. =)

    Perhaps another thing I would like to add while asking these questions is is there a way to get the images that aren't 640 pixels wide to center in the box instead of aligning left?

  5. cinghaman
    Member
    Posted 2 years ago #

    '.single-portfolio .portfolio-thumbs img {
    display: block;
    margin: 0 auto;
    }'
    margin:0 auto; would make them center aligned

    secondly regarding the upload size, so it might be that for these pages you use a particular theme file (not sure how theme is structured)
    so it could be in that particular file that it hard crops your images (which it has to as the coder has to make sure the images dont go out of container (mainbody) this is where .container class could use overflow:hidden property

    Or that thing could well be managed through your themes functions file,

    Or may be you could follow the css hack i have given u and make sure you upload photos of size 620 by what ever the height is, as i my code i had just put the height u could define height and width

    these are general assumptions cant say more than this without actually looking at the code

  6. pixelpixie0521
    Member
    Posted 2 years ago #

    Once again thanks for the advice, I will try those things out.

    I don't know why I didn't notice this before but I just realized something on the upload menu. Even though I'm uploading the images at full size, the option right above it is "Large" and it's listed as 632x290 which is the dimensions it's cropped my images to. Here's a link to a screenshot of this menu...

    Upload Menu

    I'm no coder but does it sound probable that if I can find out where this is defined then I can alter it? Any ideas on where that might be or is that impossible without seeing the code?

  7. cinghaman
    Member
    Posted 2 years ago #

    So this is standard wordpress upload, so going back to my very first comment
    you can define width height in settings > media

    u can define your settings, the other options r wordpress media presets which automatically detects your upload file dimensions and propotionally gives you width / height options

  8. pixelpixie0521
    Member
    Posted 2 years ago #

    I'm sorry, something just isn't clicking about that. There has to be something in the code that is overriding those settings because in Settings>Media the max dimensions for "Large" images is 1024x1024 (see link below) not 632x290. 632x290 is also not even proportional to the dimensions of the image whose settings are shown in the first screen shot, which is why my image is being vertically cropped.

    Just in general though I find it very hard to believe that wordpress' standard settings would be to crop images to a height of only 290 pixels...

    As I said before though I will try your other suggestions.

    http://img.photobucket.com/albums/v329/CatOCraze/Picture2-1.png

  9. pixelpixie0521
    Member
    Posted 2 years ago #

    I think I just actually found the overrides in the code... Now I'm just not sure how to fix them for what I want. I don't know if there is a way to set the height to automatically adjust per image? Or is it better to set a maximum height and then anything where they height is smaller it won't matter? Is there a pm or email that I could maybe send you a snippet of this code and you might be able to help?

  10. cinghaman
    Member
    Posted 2 years ago #

    the media thing u see is max heights as such

    so just uncheck the crop thumbnail thing
    and in auto embed add the width it already has a height define

  11. Max
    Member
    Posted 2 years ago #

    Is your file perhaps only 632x290? WordPress will not upsize files, so if the original is smaller than whatever you have set in Large, that particular large will simply be set to the same as full-size...

  12. pixelpixie0521
    Member
    Posted 2 years ago #

    As I've said before I really don't think the settings>media was the issue but I do still thank you for your advice.

    I did however experiment with changing the code I mentioned above that I found where I changed the 290 height that was listed to '' and that seemed to do the trick! No more cropped images. And then I used the code you gave me...

    .single-portfolio .portfolio-thumbs img {
    display: block;
    margin: 0 auto;
    }

    ...and now the vertical images are centered and the height on all of the images are adjusted accordingly. Thanks again =)

  13. cinghaman
    Member
    Posted 2 years ago #

    :) great cheers

Topic Closed

This topic has been closed to new replies.

About this Topic