MyBB Community Forums

Full Version: Can I use vector images (.svg) in MyBB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys, new to myBB, I was wondering is it possible instead of .png to use .svg as a MyBB logo and all the other buttons so it can look better when zoomed Smile ?
Of course. You should be able to just upload the svg somewhere and reference it in your theme to use it.

For buttons however I would recommend CSS buttons. It doesn't use any images and it will still look great when zoomed in. Look in the User Submitted Tutorials forum, there's a few guides.
Yes that's possible, as MyBB just provides a reference to these images and it's the browser that renders it.

Therefore your user's browser must support it.

Almost all versions of Firefox and Chrome support .svg rendering, and IE 9+ does as well.
http://caniuse.com/svg

If you expect users with outdated browsers to frequent your forum, you might consider a work around with something like RaphaelJS, as seeing a forum full of broken images will make a user almost instantly close the page.
Well, first, that was lightning fast answer, thank you!! Second, that's just awesome, I'll try css buttons and vector logo and see what happens. But isn't it strange that almost nobody uses it? Is there a reason for that? Even in this forum the logo is not vector and the buttons are images? Is it faster that way?
(2013-04-28, 12:40 PM)gen6 Wrote: [ -> ]But isn't it strange that almost nobody uses it? Is there a reason for that? Even in this forum the logo is not vector and the buttons are images? Is it faster that way?

Faster and more reliable - if the browser does the rendering, it may do something wrong / display it differently than intended, or it may simply be slow because rendering SVG takes a bit of time (depending on the complexity of the image). Plus the only advantage of vector (zooming) is rarely done in a browser.
(2013-04-28, 12:47 PM)frostschutz Wrote: [ -> ]
(2013-04-28, 12:40 PM)gen6 Wrote: [ -> ]But isn't it strange that almost nobody uses it? Is there a reason for that? Even in this forum the logo is not vector and the buttons are images? Is it faster that way?

Faster and more reliable - if the browser does the rendering, it may do something wrong / display it differently than intended, or it may simply be slow because rendering SVG takes a bit of time (depending on the complexity of the image). Plus the only advantage of vector (zooming) is rarely done in a browser.

I'd toss in scaling as well. If he ever wanted to resize his buttons or any other vector graphic on the page, the svg would scale perfectly/
Yes, but for that it's sufficient to keep the SVG source to yourself and produce whatever bitmap icon size you currently desire. That's how most icons work. I rarely see SVG directly on a webpage, and it just doesn't work particularly well