Skip to content

Svg preview not working #1223

Closed
Closed

Description

@bilalmalkoc

In file type, i upload svg image, but preview doesn't show it. For allow to upload svg i used Safe SVG plugin.

$cmb_services->add_field( array(
    'name'         => esc_html__( 'Navigation Image (Svg)', 'test' ),
    'id'           => $prefix . 'servicesNavigationImageSvg',
    'type'         => 'file',
    'query_args'   => array(
        'type' => array(
            'image/svg',
        ),
    ),
    'preview_size' => 'thumbnail',
) );

Activity

  1. tw2113 commented on Jan 31, 2019

    @tw2113
    Contributor

    Until told otherwise, I think this is a detail that needs added as an enhancement for the field type above, if not overall. As is, we just may not have things set to display a preview of sorts, and I don't know offhand how to possibly achieve it as well.

  2. tw2113 commented on Feb 2, 2019

    @tw2113
    Contributor

    Possibly related? #874

  3. bilalmalkoc commented on Feb 2, 2019

    @bilalmalkoc
    Author

    @tw2113 it requires to edit js file. But i am using with plugin. It must be fixed with new update.

  4. andymb commented on Feb 18, 2021

    @andymb

    Hi, was this change ever committed? I'm using the WordPress CMB2 2.8.0 plugin and SVGs still don't display for a file list:

    Screenshot 2021-02-18 at 12 55 37

    Latest WP & the SVG Support plugin.

  5. jtsternberg commented on Feb 18, 2021

    @jtsternberg
    Member

    This should be good in the latest on the develop branch. It will still require the Safe SVG plugin in order to upload svg's to the site.

  6. added a commit that references this issue on Mar 30, 2021
    517c390
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions