Custom Fields
Re-Envisioned
Support MB Settings Page Settings Page Image Output Stuck in 150x150 Configuration

  • Creator
    Topic
  • #26988
    Resolved jackp317
    Participant

    Hi,

    I was following this tutorial and I'm having an issue with the image output. The png image that I'm testing is stuck in a 150x150 configuration.

    When outputted, the image source shows 150x150 when the image uploaded on the settings page is 1538x507 pixels. Not sure what is causing this. I noticed that the tutorial uses a square logo so it isn't affected, but my horizontal logo is.

    Code used:

    /* Get the URL of logo image from the settings page */
    function wpdd_get_mb_settings_logo_url( $field_id ) {
        $logo = rwmb_meta( 'company_logo', ['object_type' => 'setting'], 'company_options' );
        return $logo ? $logo['url'] : 'http://placehold.it/1600x900';
    }

    Here is the outputted page source:
    <img id="image-383-1283" alt="" src="https://test3.credizo.io/wp-content/uploads/sites/8/2021/04/Cybba_Logo_Color-150x150.png" class="ct-image">

    Here is the logo added to the settings page:
    Logo

    Any ideas how to not restrict the image output to 150x150 and remove that from the image file path?

    Thanks,
    Jack

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