my vite + react app does not run after restarting my laptop

Click here to view error i get when i try to start app.
when i create my app and run it works fine but whenever i reopen this app after closing my laptop, it always show me this issue.i dont know why it is showing this.

i tried to delete node_modules and package-lock.json and reinstall them but even when i try to reinstall npm it shows errors too. i dont know why these issues are occuring i am new and just learning react but my app stops working next time i open it so i have to create new everytime.

Error i get while reinstalling npm for solving previous issue

How to get a screenshot from ReactPlayer

I am using react-player (from https://www.npmjs.com/package/react-player) and JavaScript (.tsx), and I want to have a screenshot (in a file or in a canvas) when I push a button.
I checked the documentation, but nothing is written there.
If I use the getInternalPlayer

This is my code attempt:

var canvas: HTMLCanvasElement = document.createElement("canvas");

canvas.width = video.getInternalPlayer().width;
canvas.height = video.getInternalPlayer().height;

console.log("captureVideoFrame passed first step ...");

if (playerRef.current)   canvas?.getContext('2d')?.drawImage(playerRef.current.getInternalPlayer().video, 0, 0);

but I get error on the last line:

Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'.
    at captureVideoFrame (Player.tsx:187:58)
    at myOnTimelineFileClickCallback (Player.tsx:135:9)
    at onFileClick (Timeline.tsx:2252:38)

Please advise how can I get this fixed?

Is there a way to remove buttons from the UI of Microsoft Copilot across multiple devices in a network

I am an English as a Second Language (ESL) instructor looking to make activities that utilize Microsoft Copilot to generate practice sentences for students. I use a text file with some parameters written in plain English to adjust the behavior of the LLM in the conversation and fine-tune it a little. This works very well, but a major issue is the auto-fill suggestions that Copilot provides above the text bar, which essentially give the answers to the student.

I use Copilot because it is connected to the Outlook account they receive from the school, and is easiest to monitor as the course instructor. I know there are models available online that don’t have this feature, but that gets messy having them create individual accounts and not being able to audit their conversation history.

I saw that the html has them as buttons, and on the user side I can delete them from being seen.

The class is in a computer lab, with computers that the students can log-in and be a part of the school network. Is there a way I can implement a script that deletes those buttons before they appear? I can receive permissions from the school IT department if necessary.

I used the inspect tool to look at the element, then used right click to delete the button on the UI. I do not have any experience with Java.

Why does TS remove JSDoc when creating type declaration file from JS file?

When I create a type declaration file (.d.ts) from a TypeScript file that includes JSDoc, the final type declaration file still contains the JSDoc. This is helpful, because the user of the package not only gets the types, but also the documentation.

When I create a type declaration file from a JS file that includes JSDoc, the final type declaration file only includes the type declaration, but no JSDoc. This means the user of the package gets types, but no documentation in the autocomplete.

Why is that or how can I persist the JSDoc?

TS understands the JSDoc enough to create the type declarations from JS, so it seems inconsistent that it wouldn’t include them in the final output.

A package that I’m aware of that generates the type declaration file from a JavaScript file while preserving JSDoc is Svelte, but I don’t understand how.

Fullcalendar prev and next custom button event calling

I have used FullCalendar within my project and I have add customization for calendar header to display like:
header={{ left: "prev", center: "title", right: "next" }}

Now, If i click on prev and next button, Month changes but I want to set month in header.

I am unable to get the month by clicking event.

I tried using basic javascript. After that for it to work I had to add month dropdown for selection of months. Can someone answer and help me out with this problem?

Insert nested tabset in an R Bookdown document

I found this question R Bookdown: Tabbed headings and the awesome answer from @linog which was the basis for my approach.

To show you what’s the purpose for my bookdown document, I have done this in r markdown too.
For the R markdown document you need library(rmarkdown), library(pandoc) and pandoc_activate(). You render it with: rmarkdown::render("C:/YourPath/tabset.Rmd")

The file tabset.Rmd

---
title: "Test Tabset"
date: "Last edited: `r format(Sys.time(), '%d.%m.%Y')`"
output: html_document
---

# City Trips {.tabset}

These are some sightseeing tips for the cities.

## London {.tabset}

Start your sightseeing in **London** now with these popular spots

### Buckingham Palace

Enjoy a glimpse into the life of royalty with...

### Tower of London

Explore the Tower of London and discover...

## Paris {.tabset}

Start your sightseeing in **Paris** now with these popular spots

### Eiffel Tower

The Eiffel Tower is the most famous landmark in the French capital...

```{r , echo=FALSE, eval=TRUE, fig.cap='Eiffel Tower', out.width='50%'}
knitr::include_graphics('images/Eiffel_Tower.png')
```

### Louvre Museum

Housing a vast collection of art spanning centuries and continents...

## Tokyo {.tabset}

Start your sightseeing in **Tokyo** now with these popular spots

### Shinjuku

Shinjuku is one of the 23 city wards of Tokyo, but the name...

### Edo-Tokyo Museum

The Edo-Tokyo Museum is housed in a unique looking building in the Ryogoku district...

In the single nested tabs I want to insert images like done with the Eiffel Tower but for simplicity I omitted these code snippets…

See the rendered result:

enter image description here

And now it’s my purpose to adopt that in my bookdown document.

The packages you need (and hopefully I have all of them listed): library(bookdown), library(knitr), library(markdown), library(rmarkdown), library(tinytex), library(htmltools) and library(pandoc) (with pandoc_activate() afterwards)

You render it with: bookdown::render_book("C:/YourPath/index.Rmd", output_format = "bookdown::gitbook")

The file index.Rmd

---
title: "Tabset in Bookdown"
date: "Last edited: `r format(Sys.time(), '%d.%m.%Y')`"
output:
  bookdown::gitbook:
   includes:
    in_header: header.html
   css: style.css
   number_sections: true
   anchor_sections: true
   split_by: "chapter"
   config:
     toc:
       collapse: section
       before: |
         <li><a href="./">Table of content</a></li>
---


# Test Tabset

<p>Click the Buttons:</p>

<div class="tab">
  <button class="tablinks" id="defaultOpen" data-target="London" onclick="openCity(event, 'London')">London</button>
  <button class="tablinks" data-target="Paris"  onclick="openCity(event, 'Paris')">Paris</button>
  <button class="tablinks" data-target="Tokyo"  onclick="openCity(event, 'Tokyo')">Tokyo</button>
</div>

<div id="London" class="tabcontent">
    Start your sightseeing in **London** now with these popular spots
</div>


<div id="Paris" class="tabcontent">
    Start your sightseeing in **Paris** now with these popular spots
    
    <div class="tab">
        <button class="tablinks" id="defaultOpenInner" data-target="Paris1"  onclick="openCity(event, 'Paris1')">Paris1</button>
        <button class="tablinks" data-target="Paris2"  onclick="openCity(event, 'Paris2')">Paris2</button>
    </div>

    <div id="Paris1" class="tabcontent">
        The Eiffel Tower is the most famous landmark in the French capital...
        
        ```{r, echo=FALSE, fig.cap='Eiffel Tower', out.width='70%'}
        knitr::include_graphics('images/Eiffel_Tower.png', dpi = NA)
        ```
        
    </div>

    <div id="Paris2" class="tabcontent">
        Housing a vast collection of art spanning centuries and continents...
        
        ```{r, echo=FALSE, fig.cap='Louvre Museum', out.width='70%'}
        knitr::include_graphics('images/Louvre_Museum.png', dpi = NA)
        ```
        
    </div>
  
  
</div>

<div id="Tokyo" class="tabcontent">
  Start your sightseeing in **Tokyo** now with these popular spots
</div>

# More Sections

With the CSS file (style.css)

/* CSS code just for the styling of the tabs */
/* Style the tab */
.tab {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;
}

/* Style the buttons inside the tab */
.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
  font-size: 17px;
}

/* Change background color of buttons on hover */
.tab button:hover {
  background-color: #ddd;
}

/* Create an active/current tablink class */
.tab button.active {
  background-color: #ccc;
}

/* Style the tab content */
.tabcontent {
  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
}

The header file (header.html)

<script>
window.openCity = function(evt, tabId) {
  var container = evt.currentTarget.closest(".tab").parentNode;

  // Hide content only within this container
  var tabcontent = container.querySelectorAll(".tabcontent");
  for (var i = 0; i < tabcontent.length; i++) {
    tabcontent[i].style.display = "none";
  }

  // Reset buttons only within this container
  var tablinks = container.querySelectorAll(".tablinks");
  for (var i = 0; i < tablinks.length; i++) {
    tablinks[i].classList.remove("active");
  }

  // Show the selected tab and set the corresponding button as active
  var el = document.getElementById(tabId);
  if (el) el.style.display = "block";
  if (evt && evt.currentTarget) evt.currentTarget.classList.add("active");
};

// Open the default tab on page load
document.addEventListener("DOMContentLoaded", function() {
  var defaultTabBtn = document.getElementById("defaultOpen");
  if (defaultTabBtn) {
    window.openCity({ currentTarget: defaultTabBtn }, defaultTabBtn.getAttribute("onclick").match(/'([^']+)'/)[1]);
  }
  // Optionally: also open the inner default tab
  var defaultInnerBtn = document.getElementById("defaultOpenInner");
  if (defaultInnerBtn) {
    window.openCity({ currentTarget: defaultInnerBtn }, defaultInnerBtn.getAttribute("onclick").match(/'([^']+)'/)[1]);
  }
});
</script>

And also the _bookdown.yml file

new_session: no
output_dir: "docs"
rmd_files: ["index.Rmd"]
language:
  label:
    fig: "Figure "

See the rendered result (separated by horizontal lines):

enter image description here

As you can see, it’s not that what I expect:

  • In tab London the content is like code
  • Also the Paris tab is like code
  • Only the Tokyo tab is as expected

Can you please help me to fix this issue with the aim, that the tabsets are nested, the images are shown and the London tab is shown correctly.

Many thanks in advance!

Menu Refreshing when everytime page loads [closed]

i had an issue that each and every time menu refreshes i want to stop the menu refreshing

I tried changing code in layoutuser.cshtml file but unable to achieve and files linked with it also i checked everytime need help from someone to diagnose the rootcause of the issue.I need solution immediately.i will share the file also please look that tell me the exact fix

Service worker stops intercepting img fetchs after a certain time in Firefox

I’m using my React app service worker to intercept certain fetchs to concatenate to their urls a token. It works good on the initial page load, but after a certain time, when I navigate the sw stops intercepting these fetchs.

What can I do to make the sw be woke up by these fetchs like it is for js fetchs ?
I know I can simply keep it alive by pinging it continually but I’m not a big fan of this option, it can have battery related drawback apparently.

Also, my fetched images are on a different domain than my app, but the content that contains it is on the app domain.

Here is my fetch event listener:

self.addEventListener("fetch", (event) => {
        let request = event.request;

        const url = new URL(request.url);

        if (
            token &&
            request.method === "GET" &&
            autoQSAuthorizationPaths.some((path) => request.url.startsWith(path))
        ) {
            url.searchParams.set("authorization", token);
            request = new Request(url.toString(), request);
        }

        event.respondWith(fetch(request));
    });

Here is my sw registration in my app:

const registration = await navigator.serviceWorker.register("/sw.js", {
    type: "module",
    scope: "/",
});

await registration.update();

await navigator.serviceWorker.ready;

Here is my sw install and activate event listeners:

self.addEventListener("install", (event) => {
    const func = async () => {
        if (!isDev) {
            await precache();
        }
        self.skipWaiting();
    };

    event.waitUntil(func());
});
self.addEventListener("activate", (event) => {
    const func = async () => {
        if (!isDev) {
            await clearOldCaches();
        }
        await self.clients.claim();
    };

    event.waitUntil(func());
});

I tried to use this hook that I created to keep the sw alive while I’m on the app page, I revive it if I come back to the page after lefting it:

self.addEventListener("install", (event) => {
    const func = async () => {
        if (!isDev) {
            await precache();
        }
        self.skipWaiting();
    };

    event.waitUntil(func());
});
self.addEventListener("activate", (event) => {
    const func = async () => {
        if (!isDev) {
            await clearOldCaches();
        }
        await self.clients.claim();
    };

    event.waitUntil(func());
});

But, when my app is inactive and I come back to it. If the sw had been killed by Firefox during this time, the ping don’t revive it.

Woocommerce Product Variant

I am not getting solution,in wocommerce site i have addred product like HOODIES which has two sizes Youth|Adult Youth Size has two color option White|Grey and Adult has White|Grey|Red I want is as user select Youth Sizefrom drop down only White| Grey appears and when select Adult all White|Grey|Red appear. I don’t want to use any plugin. Can it be possible ?

Why does this behave differently inside a JavaScript arrow function compared to a normal function? [duplicate]

I am learning JavaScript and came across a difference in how this works in arrow functions vs regular functions.

const obj = {

name: “Tharun”,

regularFunc: function () {

console.log("Regular:", this.name);

},

arrowFunc: () => {

console.log("Arrow:", this.name);

}

};

obj.regularFunc(); // Output: “Regular: Tharun”

obj.arrowFunc(); // Output: “Arrow: undefined”

In the above code:

regularFunc prints the object’s name as expected.

arrowFunc gives undefined.

I read that arrow functions don’t have their own this, but I am confused about where the this is coming from in each case.

Can someone explain in detail why arrow functions behave differently with this compared to normal functions and when I should use one over the other?

I tried using both a regular function and an arrow function inside an object method to print the name property. With the regular function, I expected this to point to the object, and it worked correctly (Regular: Tharun). But with the arrow function, I also expected it to point to the object, however it returned undefined. I want to understand why this behaves differently here and what is the correct use case for each.

Why can my div console.log all it’s children at once but if i want them separated only the first one exists [duplicate]

currentArrayDOM is a div with 3 elements inside it; an h1, button and a div.

When I console.log(currentArrayDOM.children) they all show up collapsed in an HTMLCollection but if i try console.log(currentArrayDOM.children[1]) its undefined although console.log(currentArrayDOM.children[0]) gives me the h1. Its just the other 2 elements that disappear.

console.log(currentArrayDOM);
for (const childrenElement of currentArrayDOM.children) {
     console.log(childrenElement);
}
console.log(currentArrayDOM.children);
console.log(currentArrayDOM.children[1]);

devTools output

I was expecting to be able to use all the elements separately but it seems like that’s not allowed.

Why is arr undefined even though function returns an array? [duplicate]

const randomGIFFunc = async function(dirname) {
      const dirPath = 'src/gifs/' + dirname;
      fs.readdir(dirPath, (err, files) => {
        if (err) {
            console.log('Error reading directory: ', err );
            return;
          }
        
        const randomIndex = Math.floor(Math.random() * files.length);
        const randomGIFname = files[randomIndex];
        const randomGIFpath = dirPath + '/' + randomGIFname;

        console.log('arr in function: ' + [randomGIFpath, randomGIFname]);
        return [randomGIFpath, randomGIFname];
      })
    }

later in async code

switch (act) {
      case 'hug':
        const arr = await randomGIFFunc('hug');
        console.log("arr: " + arr); //undefined
        const randomGIFpath = await arr[0]; const randomGIFname = await arr[1];
        break;

terminal:

arr: undefined
There was an error running this command: TypeError: Cannot read properties of undefined (reading '0')
arr in function: src/gifs/hug/01.gif,01.gif

Everything I tried is already in code I gave

I can only guess that for some reason function actually happens later (judging be terminal logs) but I have no idea why code isn’t waiting for it to finish

Mongodb $push $each onto array is resetting createdAt date for all subdocuments

Hopefully this makes sense. Using mongoose to push new items into an array of subdocuments, the documents get added fine, however on certain (random) occasions, the createdAt date of the current subdocuments in the array all get changed to the most recently added timestamp. This just started happening recently and I cannot recreate the issue locally, however on production my clients (many users) are experiencing this.

My model is as follows, root shipment schema contains an subdocument array of documents (shipment documents) which are files that a user uploads to the shipment.

const DocumentFileSchema = new Schema({
    user: {
        id: {
            type: mongoose.Schema.Types.ObjectId,
            required: true
        },
        firstName: {
            type: String,
            required: true
        },
        lastName: {
            type: String,
            required: true
        }
    },
    file: {
        type: String,
        required: true
    },
    name: {
        type: String,
        required: true
    }
}, {
    timestamps: true
});

const ShipmentSchema = new Schema({
    ...
    documents: [DocumentFileSchema]
}, {
    timestamps: true,
    collection: 'shipments',
    toJSON: { virtuals: true }
})

I’m adding files using the following function (upload handled elsewhere).
I recently added the createdAt date into this function to force a value instead of letting mongo handle the timestamp, and this has not solved the issue.

const addFiles = async (id, body, files) => {
    let user = JSON.parse(body.user);

    let docs = [];
    if (files) {
        files.forEach(v => docs.push({ user: { ...user }, name: v.key.replace('shipments/',''), file: withHttp(v.location), createdAt: new Date() }));
        return ShipmentModel.findByIdAndUpdate(
            { _id: id },
            { $push: { documents: { $each: docs } } },
            { new: true }
        );

    }
}

The record in mongo (locally) works flawless but as mentioned on production (which is the same mongo database), users are uploading documents at different times and the database ends up with all subdocument timestamps reset to the newest time.

What is does locally (correct, proper timestamps):

{
  "_id": {
    "$oid": "xxx"
  },
  ...
  "documents": [
    {
      "_id": {
        "$oid": "xxx"
      },
      "user": {
        "id": {
          "$oid": "xxx"
        },
        "firstName": "John",
        "lastName": "Doe"
      },
      "name": "VERSION 2-A.pdf",
      "file": "xxx.pdf",
      "updatedAt": {
        "$date": "2025-08-20T16:13:21.609Z"
      },
      "createdAt": {
        "$date": "2025-08-20T16:13:21.609Z"
      }
    },
    {
      "_id": {
        "$oid": "xxx"
      },
      "user": {
        "id": {
          "$oid": "xxx"
        },
        "firstName": "Jane",
        "lastName": "Doe"
      },
      "name": "PDF_Caregiver Connections-2.pdf",
      "file": "xxx.pdf",
      "updatedAt": {
        "$date": "2025-08-20T16:54:59.307Z"
      },
      "createdAt": {
        "$date": "2025-08-20T16:54:59.307Z"
      }
    }
  ],
  "createdAt": {
    "$date": "2024-07-23T18:05:50.052Z"
  },
  "updatedAt": {
    "$date": "2025-08-20T17:28:39.538Z"
  },
  "__v": 0
}

When another user adds a new document at a completely separate time this is what happens on production (but only happens randomly, not for every shipment), it resets createdAt date to most recent subdocument timestamp:

{
  "_id": {
    "$oid": "xxx"
  },
  ...
  "documents": [
    {
      "_id": {
        "$oid": "xxx"
      },
      "user": {
        "id": {
          "$oid": "xxx"
        },
        "firstName": "JOE",
        "lastName": "RANTSEVIC"
      },
      "name": "937379JR RC.pdf",
      "file": "xxx.pdf",
      "createdAt": {
        "$date": "2025-08-25T11:51:49.375Z"
      },
      "updatedAt": {
        "$date": "2025-08-25T11:51:49.375Z"
      }
    },
    {
      "_id": {
        "$oid": "xxx"
      },
      "user": {
        "id": {
          "$oid": "xxx"
        },
        "firstName": "ALAN",
        "lastName": "SALAZR"
      },
      "name": "RP-937379JR-Carrier-Contract.pdf",
      "file": "xxx.pdf",
      "createdAt": {
        "$date": "2025-08-25T11:51:49.375Z"
      },
      "updatedAt": {
        "$date": "2025-08-25T11:51:49.375Z"
      }
    }
  ],
  "createdAt": {
    "$date": "2025-08-25T11:15:00.627Z"
  },
  "updatedAt": {
    "$date": "2025-08-25T15:09:36.155Z"
  },
  "__v": 0
}

Please help!

Smugmug API Setting Thunbnails for albums/Removing Blurry Thunbnails

Hello I am currently coding to photo gallery website and Im using the Smumug API to get all my pulbic albums+photos in the album to show up on the gallery and the issue is that for the gallery to show the albums Im getting the placeholder.jpg as the thunbnails and the second issue is when going into the albums the photo thunbnails are extremely blurry and ive been trying everything to get rid of the blurry from the thunbnails but when I click on the img to do the viewmodel box the img perfectly fine looking.

(I am fairly new to coding Javascript and using API’s most of the javascript involving the API is helped from using AI’s and if someone could help me fix this and also give me some references online to where to find more exmaples of JS being used for API calling and how if im having issues where I can go to find the solution instead of using AI)
JavaScript Code:

`async loadAlbums() {
    try {
        this.isLoading = true;
        this.updateLoadingState();

        const response = await 
  axios.get('https://api.smugmug.com/api/v2/user/jdstudiophotography!albums', {
            params: {
                APIKey: this.API_KEY,
                count: 100,
                _expand: 'HighlightImage,HighlightImage.ImageSizes'
            },
            headers: {
                'Accept': 'application/json',
                'X-Smug-Version': 'v2'
            }
        });

        if (!response.data.Response || !response.data.Response.Album) {
            throw new Error('Invalid albums response');
        }

        this.albums = response.data.Response.Album.map(album => {
            let coverImage = './images/albums/placeholder.jpg';
            // In loadAlbums method, update the coverImage selection in the map 
  function:
            coverImage = '';
            if (album.HighlightImage && album.HighlightImage.ImageSizes) {
                const imageSizes = album.HighlightImage.ImageSizes;
                coverImage = imageSizes.LargeImageUrl ||
                            imageSizes.MediumImageUrl ||
                            imageSizes.SmallImageUrl ||
                            album.HighlightImage.ThumbnailUrl;
            }

            return {
                id: album.AlbumKey,
                title: album.Title || 'Untitled Album',
                imageCount: album.ImageCount || 0,
                coverImage
            };
        });

        this.isLoading = false;
        this.renderAlbums();
    } catch (error) {
        console.error('Error loading albums:', error);
        this.isLoading = false;
        this.updateLoadingState('Error loading albums.');
    }
 }`




`async loadAlbumImages(albumId) {
    try {
        this.isLoading = true;
        this.updateLoadingState();
        const response = await    
      axios.get(`https://api.smugmug.com/api/v2/album/${albumId}!images`, {
            params: {
                APIKey: this.API_KEY,
                count: 100,
                _expand: 'ImageSizes'
            },
            headers: {
                'Accept': 'application/json',
                'X-Smug-Version': 'v2',
                'X-Smug-ResponseType': 'JSON'
            }
        });

        if (!response.data.Response || !response.data.Response.AlbumImage) {
            throw new Error('Invalid album images response structure');
        }

        const images = response.data.Response.AlbumImage.map(image => {
            const imageSizes = image.ImageSizes || {};
            return {
                id: image.ImageKey,
                title: image.Title || image.FileName,

                thumbnail: imageSizes.MediumImageUrl || 
                          imageSizes.SmallImageUrl || 
                          image.ThumbnailUrl,
                // Keeps medium URL for grid view
                mediumUrl: imageSizes.MediumImageUrl || 
                          imageSizes.SmallImageUrl || 
                          image.ThumbnailUrl,
                // Keeps original for maximum quality when needed
                originalUrl: image.OriginalUrl || image.ArchivedUri
            };
        });

        this.currentImages = images;
        this.isLoading = false;
        this.renderImages();

    } catch (error) {
        console.error('Error loading album images:', error);
        this.isLoading = false;
        this.updateLoadingState('Error loading album images. Please try again 
       later.');
     }
  }`

`renderImages() {
const container = document.querySelector(‘.grid-albums’);
container.innerHTML = ”;

const placeholder = './images/albums/placeholder.jpg';

this.currentImages.forEach((image, index) => {
    const imageElement = document.createElement('div');
    imageElement.className = 'image-card';
    imageElement.innerHTML = `
        <div class="image-thumbnail">
            <img src="${image.thumbnail || placeholder}" alt="${image.title}"
                 loading="lazy"
                 onerror="this.onerror=null; this.src='${placeholder}';">
            <div class="image-info">
                <h3>${image.title}</h3>
            </div>
        </div>
    `;

    imageElement.addEventListener('click', () => {
        this.showLightbox(image, index);
    });

    container.appendChild(imageElement);
});

}`

`renderAlbums() {
const container = document.querySelector(‘.grid-albums’);
container.innerHTML = ”; // Clear the container

const placeholder = './images/albums/placeholder.jpg';

this.albums.forEach(album => {
    const albumElement = document.createElement('div');
    albumElement.className = 'album-card';
    albumElement.innerHTML = `
        <div class="album-thumbnail">
            <img src="${album.coverImage || placeholder}" alt="${album.title}"
                 loading="lazy"
                 onerror="this.onerror=null; this.src='${placeholder}';">
            <div class="album-info">
                <h3>${album.title}</h3>
                <p>${album.imageCount} photos</p>
            </div>
        </div>
    `;

    albumElement.addEventListener('click', () => {
        window.location.href = `gallery.html?albumId=${album.id}`;
    });

    container.appendChild(albumElement);
});

}`

Img Blurry
Gallery Album Thumbnail

I attemped to have the code where it gets all the sizes for the albums thunbnail and if Smugmug has any highligh imgs saved to also reterive that information and go from the biggest size to smallest and if all of those fail that it will as the final use the placeholder.jpg but im still getting that placeholder.jpg and the same was from the actual imgs in the album but the imgs thumbnail are still blurry