Support » Plugin: WP Job Manager » Company logo

Viewing 12 replies - 1 through 12 (of 12 total)
  • We are also facing the same problem, and an enhancement to allow employers to resize their logo to fit within the thumbnail would be incredibly appreciated–right now, we are manually downloading, resizing, and re-attaching each logo before publishing job posts, so that they are displayed correctly, which is tremendously time-consuming.

    I couldn’t replicate this on my site, but it seems like the logos are possibly being automatically resized on this site running WPJM, which might provide a way forward?

    If you’re able to replicate what they are doing (if they have in fact modified their code to get logos of different dimensions to display without being cut-off) or find another solution, could you post back to let me and others know, too?

    Here’s another site running WPJM that has even more heavily modified its job listings and single job listing templates, and might provide ideas, too.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    The company logo uses the regular thumbnail image size, so turning off cropping under Settings > Media > Image sizes should work.

    However, since this is something that comes up on a regular basis, I opened up a new report for our developers here:

    https://github.com/Automattic/WP-Job-Manager/issues/1976

    @richardmtl – thanks for opening opening a report! Turning off cropping doesn’t work–instead of cropping the sides off, it (for lack of the technical term) squishes rectangular images into the square logo space on the job listing, heavily distorting them. There must need to be a template or CSS change that’s needed, too, even with turning off cropping?

    • This reply was modified 1 year, 2 months ago by hastibe.
    Plugin Contributor Richard Archambault

    (@richardmtl)

    YOu’d have to edit the thumbnail size as well, in Media -> Image Sizes. Setting it to something like 300×150 will make images 150px in height and varying in width up until a 2:1 aspect ratio. Does that help?

    @richardmtl — hmm, this still doesn’t have any effect for me (and on a test site, with just WP Job Manager active and on Twenty Sixteen).

    In Settings -> Media, I changed the Thumbnail size to 300 for “Width” and kept it at 150 for “Height” and I unchecked “Crop thumbnail to exact dimensions…”

    Then, I attached an image to a job post submission from the front-end that is a rectangle (1353 x 629), but it still shows up as a squished square in the logo space on the listing.

    …If I remove the “width: 3em;” and “height 3em:” from .single_job_listing .company img, it then displays as a rectangle, but is too large–maybe this would work if the width and height CSS were something different?

    Further experimenting, if I change the width to “auto” on images that are taller than they ware wider (e.g. 629 x 1353) or change the height to “auto” on images that are wider than they are taller (e.g. 1353 x 629), it then works, but if you have images being uploaded that could be either way (as in our case), this obviously isn’t a workable solution like this, at least.

    Plugin Contributor Cena

    (@cena)

    @hastibe I’m going to close this thread for now, but your last comments from a month ago would be a perfect addition to the Github issue. 🙂

    hastibe

    (@hastibe)

    🙁

    Plugin Contributor lamday

    (@lamdayap)

    Hey @hastibe, you can add the following snippet of CSS to allow for rectangular logos:

    img.company_logo {
    height: auto;
    max-height: 80%;
    }
    

    **Note I’ve limited the max-height to 80% so that it doesn’t overflow onto other job listings
    **Also, I am not an employee for WPJM. I am a contributor as I previously worked for them.

    • This reply was modified 11 months, 2 weeks ago by lamday.

    @lamdayap — thanks for sharing! I added your CSS to (the Customize -> Custom CSS tab of) a fresh installation on the Twenty Twenty theme, and tested it with a rectangular logo, but didn’t notice any change, unfortunately.

    Also, for the “height” declaration to override WP Job Manager’s default CSS, I believe you need to add “!important” to it (this still didn’t change how the logo displayed on the job listing, though).

    Are there other CSS or template changes that need to be made for this to work?

    EDIT: oh, right–I also have to uncheck “Crop thumbnail to exact dimensions (normally thumbnails are proportional)” under Settings -> Media in the WordPress admin dashboard, right? …It now seems to be working–thanks! I’m going to experiment with this and hopefully implement it.

    • This reply was modified 11 months, 1 week ago by hastibe. Reason: update

    Try this

    img.company_logo {
    object-fit: contain;
    }

    @badran101 — oh wow, that looks to work really nicely. Thank you so much for sharing!

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.