• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Upload SVG as featured image

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Upload SVG as featured image

This topic is: not resolved

Tagged: media upload, SVG

  • This topic has 1 reply, 1 voice, and was last updated 12 years, 1 month ago by mommaroodles.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 29, 2014 at 11:31 am #87704
    mommaroodles
    Member

    I recently came across this snippet which allows you to upload svg images - What I want to do is use the svg iamge as a feature image for a post via media uploader and it works on the genesis framework theme and even displays on the front end. the only problem is that it's not resizing the image.

    Here is the snippet:

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

    and this is what it outputs.

    <img width="1" height="1" itemprop="image" alt="android" class="alignleft post-image entry-image" src="http://localhost/www.wordpress.com/wp-content/uploads/2014/01/android.svg">

    Notice the height and width I've been searching for a way to fix this, but have been unsuccessful and was wondering if anyone here might now how to fix this.

    Unfortunately i cant provide an url as I'm working locally.

    February 1, 2014 at 6:05 am #87998
    mommaroodles
    Member

    I've finally found a way to fix this - awesome now I can upload svg images and use them as featured images 🙂

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble