• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

why svg swap from png not displaying

Enthusiast ,
Dec 03, 2017 Dec 03, 2017

Copy link to clipboard

Copied

Hi,

Logo was a .png. Decided to convert to SVG, ensuring artboard dimensions matched original PNG.

Swapped with a find & replace. Tested in live view locally, and nothing displays.

Any idea?

<h1 class="navbar-brand navbar-brand_"><a href="index.html"><img src="img/logo.svg" alt="logo"></a></h1>

Views

542

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Dec 05, 2017 Dec 05, 2017

Needed to include the dimensions in the src call. Then, it appeared.

Votes

Translate

Translate
LEGEND ,
Dec 03, 2017 Dec 03, 2017

Copy link to clipboard

Copied

First thing to check is your file path, then if that does not work create a new html page just with the image link to the svg on the page.

Also have you made certain the svg format is correct, (open the svg directly in Dw). If nothing is displayed your svg headers, (xml type declaration etc) are probably incorrect or missing. If you created the svg in illustrator did you remember to 'export as svg', as simply saving as svg will not work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 03, 2017 Dec 03, 2017

Copy link to clipboard

Copied

Rather than us guessing at what is going on, it is much better to upload the project to a (temporary) online location. When you then give us the link to that location, we will be able to see first hand at what is going on.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 05, 2017 Dec 05, 2017

Copy link to clipboard

Copied

Needed to include the dimensions in the src call. Then, it appeared.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 05, 2017 Dec 05, 2017

Copy link to clipboard

Copied

LATEST

Just as an update to others with the same problem, there is no need to include the dimensions in the img src call, and it is recommended that when using the html5 doctype you do not do so. Either use css to set the dimensions or allow the containing element to 'set' the svg size for you.

svg is a vector format and will scale to any dimension without loss of quality, providing the svg uses % in its settings.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines