Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Adam Heckler

    (@adamkheckler)

    By default the company logo images should always be square I think. Can you link me to your site so I can take a look?

    Thanks!

    Thread Starter reziak

    (@reziak)

    The site allows the user to upload the image with any dimensions, the CSS kinda tries to restrict the dimensions to be square, but if the image is wider than taller (or vice-versa) it kinda ruins the layout. So i actually need to restrict that when the user is uploading it or at least find a way to crop it.

    The website im working on: https://iconic.network/jobs/

    And thanks in advance

    manorix

    (@manorix)

    Is it possible to make a rectangle image fits the square ratio without distorsion by automatically adding background in the sides to keep the original ratio of the image?

    Example:
    1. Original image size : 80 x 120
    2. Add extra white/transparent background to make it at the thumbnail ratio : 120×120 so 20 pixels on the right and the left on the original image so it’s centred

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    I don’t think it’s possible to do this. Since we only link to the uploaded image we cannot take advantage of WordPress image cropping like you do with attachments.

    We will be looking to solve this in upcoming versions. For now, CSS is the only option (or at least just limiting the height or width to stop the image being shown full size).

    A lot of companies still don’t use a 1:1 aspect ratio as default logo size, and it would be foolish to simply assume they will comply with this set standard (since 1.24.0).
    A better approach to this problem would be to hook into the WP image cropping when a company logo gets saved to the media library and if a company logo’s dimensions are not 1:1 to add a padding via CSS to the top&bottom when displaying a non-square company logo. This way square company logo thumbnails will keep their square appearance and rectangle company logo’s get a nice little padding at the bottom and top of their logo effectively displaying it square in the job listing and company profile sections.
    Would be awesome if this would be possible simply by passing a ‘rectangle’/’square’ parameter via the_company_logo();

    I’m very curious to see how this problem gets tackled.

    Plugin Contributor Adam Heckler

    (@adamkheckler)

    @s2ontwerp: According to our developer, this should no longer be an issue since version 1.24.0, because the plugin now uses the WordPress crop settings / thumbnail dimensions.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Restrict image dimension or crop it’ is closed to new replies.