• Resolved lichael06

    (@lichael06)


    There are two simple portfolio foo galleries that are active on this [ redundant link removed ]. The first gallery is made up of photos/images with jpg file types, and the second gallery is made up of photos/images with svg file types; however, there is an issue with the second gallery, as stated: “Notice: Undefined index: width in /var/www/html/wordpress/wp-content/plugins/foogallery/includes/functions.php on line 2030

    Notice: Undefined index: height in /var/www/html/wordpress/wp-content/plugins/foogallery/includes/functions.php on line 2031” whereas the first gallery has no issues/problems at all.

    Thanks,

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bradvin

    (@bradvin)

    hi @lichael06

    What plugin are you using to import and use SVG’s in the media library?

    I think the errors are because it is trying to resize SVG’s and WP cannot do that by default, so I need to reproduce the issue to try figure it out

    Thread Starter lichael06

    (@lichael06)

    I’ve already solved the issue, I’d used enhanced media library and I add this js code: function my_custom_mime_types( $mimes ) {

    // New allowed mime types.
    $mimes[‘svg’] = ‘image/svg+xml’;
    $mimes[‘svgz’] = ‘image/svg+xml’;
    $mimes[‘doc’] = ‘application/msword’;

    // Optional. Remove a mime type.
    unset( $mimes[‘exe’] );

    return $mimes;
    }
    add_filter( ‘upload_mimes’, ‘my_custom_mime_types’ );`
    to my theme functions.php file to import svg files, but then thank you for your response 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Undefined indexes’ is closed to new replies.