Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve loading time with image optimizations #112

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Improve loading time with image optimizations #112

merged 1 commit into from
Feb 28, 2024

Conversation

tfalencar
Copy link
Member

@tfalencar tfalencar commented Feb 28, 2024

Resolves #97

  • Now using enhanced:img package for most images
  • Moved files to $lib folder, so that vite can optimize it.
  • Images are now imported in svelte files instead of directly referenced.
  • Images can be added e.g. to $lib/images/projects/network_id/crowdtainer_id, then referenced as follows in the projects.json file: '/images/projects/31337/1/'
  • Images defined in projects.json that contains an URI (instead of local path), will instead directly use the normal

 - Now using enhanced:img package for most images
 - Moved files to $lib folder, so that vite can optimize it.
 - Images are now imported in svelte files instead of directly referenced.
 - Images can be added e.g. to
   $lib/images/projects/network_id/crowdtainer_id, then referenced as
follows in the projects.json file: '/images/projects/31337/1/', and all
files within this folder will be used. Singular/specific files can also
be given instead of all images under a folder.
 - Images defined in projects.json that contains an URI (instead of local path), will instead directly use the normal <img tag>
@tfalencar tfalencar merged commit 7e1d407 into main Feb 28, 2024
0 of 2 checks passed
@tfalencar tfalencar deleted the 28022024 branch February 28, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make use of @sveltejs/enhanced-img in website images
1 participant