• Resolved jobme

    (@jobme)


    Hello,

    I have run through all support topics and cannot get to find a reply.
    Essentially, what I need is the front-end users’ uploaded images (e.g. logos or resume images) to be resized in a square format of max. let’s say 500x500px (in crop mode so they all follow this square pattern).

    I see in the wp-resume-manager-template.php file there is a “job_manager_get_resized_image” and there is a “full” value nearby as well.

    Is this a feature that was supposed to work but doesn’t work for me for some reason or it has nothing to do with actual resizing?

    Otherwise, does anybody have any advice to give on how to do this? The wordpress native resizer won’t work as those files are uploaded in a folder job-listings and I really don’t want to use an additional php script to do just that.

    Tried Imsanity but no luck as well.

    Any – ANY – sort of help would be highly appreciated.

    https://www.ads-software.com/plugins/wp-job-manager/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    When the_company_logo() function is called, it will generate and retrieve a resized version of the uploaded image *unless* the function was called with ‘full’ size passed in.

    So if you want to show a smaller version somewhere, you’d call it like this, since ‘full’ is the default value:

    the_company_logo( 'thumbnail' );
    Thread Starter jobme

    (@jobme)

    Hi mikejolley, thanks for replying on this.
    I changed the full to large – which based on the wordpress codex is supported (and my wordpress configuration as well) but no resizing was made.

    In fact i uploaded a brand new image and when i checked it, it uses the full size of it (both in terms of file size and actual dimensions).

    Am I missing something? To be very specific all i need is any kind of photo used in the site either as a logo or as a resume photo to be scaled at any sort of value near 500×500 px. It’s not that I want to show anywhere else a smaller photo. Any idea on this? I truly appreciate your support.

    Plugin Author Mike Jolley

    (@mikejolley)

    When you changed the full to large, in which template file did you do so? I’ll give it a go.

    Thread Starter jobme

    (@jobme)

    thanks for that. I am currently working on the resumes section and planning to proceed with the job manager afterwards.

    So I edited line 89 on on wp-resume-manager-template.php located in the includes folder of the wp job manager resumes plugin.

    Plugin Author Mike Jolley

    (@mikejolley)

    Looked into it.

    I use $_wp_additional_image_sizes global to get the possible image sizes – it seems that doesn’t contain all image sizes in WP.

    Try using: post-thumbnail instead of large.

    Thread Starter jobme

    (@jobme)

    thanks for looking into it.
    but nope, no luck yet. Tried also as just ‘thumbnail’ and ‘thumb’ but nothing changes…

    In all websites i ‘ve seen that use this plugin, all images look bad just because of this as far as I understand.

    Maybe a plugin that can change all images in the job-listings folder (where the plugin stores the uploaded images) could help but couldn’t find one that works anywhere.

    What can be done?

    Plugin Author Mike Jolley

    (@mikejolley)

    I’ve made these changes to support WP sizes (thumbnail, large, medium): https://github.com/mikejolley/WP-Job-Manager/commit/62638c3d38df33f2515deb4b91d867367fc076e8

    Thread Starter jobme

    (@jobme)

    It works just perfectly! No words to say thanks. I really appreciate your support and I truly recommend that you implement it in future updates of the plugin – it’s a way better practice than allowing huge images.

    Once again thanks a a lot.

    I tested it for the job manager plugin itself, I assume that the same changes but on different lines have to be made for the resumes manager, right?

    Thread Starter jobme

    (@jobme)

    hmmm I see the resumes manager is slightly different:

    function the_candidate_photo( $size = 'full', $default = null, $post = null ) {
    	$logo = get_the_candidate_photo( $post );
    
    	if ( $logo ) {
    
    		if ( $size !== 'full' )
    			$logo = job_manager_get_resized_image( $logo, $size );
    
    	echo '<img class="candidate_photo" src="' . $logo . '" alt="Photo" />';
    
    	} elseif ( $default )
    		echo '<img class="candidate_photo" src="' . $default . '" alt="Photo" />';
    	else
    		echo '<img class="candidate_photo" src="' . RESUME_MANAGER_PLUGIN_URL . '/assets/images/candidate.png' . '" alt="Logo" />';
    }

    The above function is the one but doesn’t look like the job-manager section. In order to avoid opening another thread can you please guide me a little bit how to change this too?

    Thanks.

    Plugin Author Mike Jolley

    (@mikejolley)

    It works the same – and uses the same job_manager_get_resized_image function. Changing $size = ‘full’ to something else will work.

    Thread Starter jobme

    (@jobme)

    Fantastic – thank you very much! we can call it resolved then. For once again, I really appreciate your support.

    Thread Starter jobme

    (@jobme)

    Resolved.

    Hello!
    I am trying to do the very same thing with the resumes. The images on resume list are huge and some are small.

    I’m sorry but I did not understand this:

    1. What lines am I supposed to remove?

    2. What am I supposed to replace them exactly with?

    Please, help will be appreciated.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘get_resized_image and generally Resizing Images’ is closed to new replies.