Fix Image Rotation

In some cases, you may except the wrong image rotation after upload. There is a simple plugin that helps with wrong rotation of the files:

Fix Image Rotation

Unfortunately, it won’t work right out the box, because WPJobBoard uses his own upload system. But we have a simple code snippet that allows you to fix images uploaded for WPJobBoard. It is especially important for your users, who may upload wrong portfolio photos or company logos.

Code snippet is really simple:

require_once GS_FIR_PATH . 'includes/class-fix-image-rotation.php';
add_filter( "daq_move_uploaded_file", "wpjb_fix_image_rotation", 10, 3 );
function wpjb_fix_image_rotation( $new_file, $tmpPath, $result ) {

    $image_rotation = Fix_Image_Rotation::get_instance();
    $image_rotation->fix_image_orientation( $new_file );

    return $new_file;
}

If you do not know how to add snippet properly, thak a look on our documentation file, where we explained how you can do this.

Leave a Reply

Your email address will not be published. Required fields are marked *