Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

use svg image in next js

import Image from 'next/img';

import Illustration from '../public/Rolling-1s-200px.svg';
// can be imported from anywhere, not necessarily public

// ...

<Image src={Illustration} />
// one needs to use `Illustration.src` to get the source URL
// <img src={Illustration.src} ... />
Comment

use svg image in next js

import Image from 'next/img';

// ...

<Image src="/Rolling-1s-200px.svg" width="2000" height="2000" />
Comment

PREVIOUS NEXT
Code Example
Javascript :: regex e-mail 
Javascript :: jquery style top 
Javascript :: p5.js 
Javascript :: how to give css style in javascript 
Javascript :: randint js 
Javascript :: js day monday tuesday wednesday 
Javascript :: jquery datatable table header not increasing on expanding 
Javascript :: update node js 
Javascript :: TypeError: Class constructor Model cannot be invoked without 
Javascript :: js wait for element to load 
Javascript :: declare an array nodejs 
Javascript :: javascript getdate 
Javascript :: how to write a json in r 
Javascript :: generator function fibonacci 
Javascript :: dynamic navigation with subitems 
Javascript :: this.setstate is not a function 
Javascript :: js addeventlistener foreach 
Javascript :: jquery onclick anchor tag scroll to div with exact position 
Javascript :: nodejs update in mysql 
Javascript :: vscode shortcut to search for file 
Javascript :: how to fetch first 10 characters of a string in node js 
Javascript :: how reliable is js hasownproperty 
Javascript :: going through every attributes of an object javascript 
Javascript :: what is last index of array 
Javascript :: text filed press enter event jquery 
Javascript :: $push in mongoose 
Javascript :: javascript base64 decode 
Javascript :: fullcalendar react add event duration 
Javascript :: how to show calendar in javascript 
Javascript :: react - min & max for dates 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =