Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #708829

    How can I use a GIF animation as featured image

    I found this piece of code, where it will insert the GIF, without changing the size, so that the GIF will show as featured image. If JPEG or other image file, it wil recize.
    But where to put the code, or is there any other way to use GIF animations inside the Enfold theme?

    <?php
    $url = wp_get_attachment_url( get_post_thumbnail_id() );
    $filetype = wp_check_filetype($url);
    if ($filetype[ext] == ‘gif’)
    {the_post_thumbnail(‘full’, array(‘class’ => ‘img-responsive’)); }
    else
    {the_post_thumbnail(‘medium’, array(‘class’ => ‘img-responsive’));}
    ?>

    #709005

    Hey Jakob,

    Where did you find the code? It doesn’t look like a finished function.

    Best regards,
    Rikard

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