Gehört zu: WordPress
Grafiken in WordPress: SVG, SWF, ODG, VSD, PPT
Auch in WordPress-Artikeln und -Seiten möchte man ja ab und zu auch schöne Vektorgrafiken einbauen – nicht nur Pixel-Bilder.
Je nach Format (SVG, SWF, ODG, VSD, PPT,…) sind da unterschiedliche Lösungen möglich, wo bei schon das Upload solcher Grafiken ein Problemchen sein kann.
SVG Graphics
Eine SVG-Grafik kann einfach über im IMG-Tag in HTML eingebunden werden. In WordPress wird das wie folgt unterstützt.
SVG Upload
Source: https://wordpress.org/support/topic/svg-upload-not-allowed
SVG upload not allowed?? (9 posts)
-
I’m trying to put an SVG image into a post, but I can’t upload it.
“Harajuku map.svgz” has failed to upload due to an error Sorry, this file type is not permitted for security reasons.
What gives?! It’s just an image!
-
You can overcome the security warning by adding this to your current themes functions.php file.
add_filter('upload_mimes', 'custom_upload_mimes'); function custom_upload_mimes ( $existing_mimes=array() ) { // add the file extension to the array $existing_mimes['svg'] = 'mime/type'; // call the modified list of extensions return $existing_mimes; }
Then you should be able to upload files with an .svg extension