PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, May 5, 2022

[FIXED] Where to put images with Svelte Kit

 May 05, 2022     image, sveltekit     No comments   

Issue

I have been using Svelte for a little while and now I have switched to Svelte Kit so I can add multiple pages. I want to add some images to my site but I don't know where to put them. In Svelte I would just put them in public/images but there is no public folder with Svelte Kit (I set it up with npm init svelte@next my-app if that matters). Would I put them in static?

Thanks!


Solution

I added the images in the static folder and referenced them with /images/photo.jpg like @b2m9 said and it works perfectly.



Answered By - Anders
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing