Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter prestroad

    (@prestroad)

    Turned out to be a CSS conflict with the Twenty Twenty Five theme.

    The style="width:100%" on the <img> tag, AND the hard‑coded width="###" and height="###" attributes conflict as Twenty Twenty‑Five applies height:auto to images unless something upstream forces a conflicting box model. The plugin wrapper + inline styles create a layout where the browser stretches the image to fill the container’s height.

    The fix – put the photo #potd shortcode in a group – add a css class specific to that group (e.g wppa-img-fix) the add custom css for wppa-img-fix img { height: auto !important; max-width: 100%; }

    This fixed the image size target only to the specific block without affecting other images.

    Thread Starter prestroad

    (@prestroad)

    Thanks – I’ll install the update.

    Best, Theo

    Thread Starter prestroad

    (@prestroad)

    Thanks!

    Thread Starter prestroad

    (@prestroad)

    Hi Jeff – after re-installing the USP plugin the error persisted. I did a little research on the error – wp_generate_attachment_metadata() – found this:

    Hi Jeff – after re-installing the USP plugin the error persisted. I did a little research on the error – wp_generate_attachment_metadata() – found this: “If this function is undefined in the environment where it is to be used, such as within a Shortcode, use the include function:

    if ( ! function_exists( ‘wp_crop_image’ ) ) {
    include( ABSPATH . ‘wp-admin/includes/image.php’ );
    }

    Since I call USP with a shortcode on a “submit form” page , I added that code to the USP file shortcode-misc.php and it solved the problem. I’m not sure how generalizable this problem and fix is – but it’s now working for me.

Viewing 4 replies - 1 through 4 (of 4 total)