• Loading Lottie
    When loading a file json, this error occurs, I tried with a theme Astra and a regular theme.
    “This block contains an error and cannot be viewed.”
    On your site, I found the “mime_types” function, but that didn’t help either.

Viewing 1 replies (of 1 total)
  • Hello @spicina ,

    You just need to add the following code to the functions.php file of your child theme:

    function mime_types($mimes) {
    $mimes['json'] = 'application/json';
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
    }
    add_filter('upload_mimes', 'mime_types');

    Also, add the following code in the wp-config.php file:

    define( 'ALLOW_UNFILTERED_UPLOADS', true );

    I hope that helps.

    Regards,
    Sweta

Viewing 1 replies (of 1 total)
  • The topic ‘Loading Lottie json’ is closed to new replies.