Image size in Oxygen

Support MB Settings Page Image size in OxygenResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27648
    matthias@comflow.be[email protected]
    Participant

    Hi Metabox team

    I'm struggling with the fields from my settings page to show them in the right dimensions:
    I'm using the code snippet below. However in the RWMB_meta the array with the size parameter is added later on, but doesn't do anything in specific. The thing is, when i return the value of that in a field, it automatically shows it square as the thumbnail, but i want it to keep it's orginal ratio. Can anyone help me improve my code? I'm using a single image as meta box custom field.

    /* Avoid Undefined Function Errors */
    if ( ! function_exists( 'rwmb_meta' ) ) {
        function rwmb_meta( $key, $args = '', $post_id = null ) {
            return false;
        }
    }
    /* Get the URL of logo image from the settings page */
    function wpdd_get_mb_settings_logo_url( $field_id ) {
        $logo = rwmb_meta( 'sitewide_logo', ['object_type' => 'setting'], 'general_settings', array( 'size' => 'Large' ) );
        
        return $logo ? $logo['url'] : 'https://morlinsgarage.be/wp-content/uploads/2021/04/logomorlins2_Tekengebied-1.png';
    }
    #27649
    Long NguyenLong Nguyen
    Moderator

    Hi Matthias,

    Thank you for reaching out.

    Please follow this topic to get original size of the image or another thumbnail size https://support.metabox.io/topic/settings-page-image-output-stuck-in-150x150-configuration/

    #27652
    matthias@comflow.be[email protected]
    Participant

    Thank you so much for your quick response and sorry, didn't found the other topic. Thanks!

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