Skip to content

Commit

Permalink
Refactor to support lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
fscek committed Mar 19, 2024
1 parent 349bea3 commit 4a477d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/data/visuals.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"title": "Visual Artwork 1",
"date": "",
"date": "2016",
"description": "A description of the first visual artwork.<br>Testing out breaks.",
"images": [
"https://cdn.jsdelivr.net/gh/fscek/szch-me-assets/images/music/2024/releases/test.jpg",
Expand Down
2 changes: 1 addition & 1 deletion assets/js/visuals-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function fetchAndRenderVisuals() {
let visualHTML = `<h3 class="visual-title">${visual.title}</h3>`;
if (visual.images && visual.images.length) {
visual.images.forEach(image => {
visualHTML += `<img src="${image}" alt="${visual.title}" class="visual-image">`;
visualHTML += `<img src="${image}" alt="${visual.title}" loading="lazy" class="visual-image">`;
});
}
if (visual.date) {
Expand Down

0 comments on commit 4a477d7

Please sign in to comment.