Randomize a picture carousel - possible?

Hi there,
Does anyone know whether it’s possible to randomize a picture carousel? I know how to create one, but it’s always pic 1 that comes first, pic 2 that comes second, etc. I’d like the pictures to appear randomly.

thx

Don’t know if it applies to your need but I randomize image URL links in my backend sheet using a script.

It could. What kind of script do I need to use then? THX.

In my case, I have image URLs in a column (AR) in the “Master Options” sheet.
I generate a random number between 2 and 12 then use the number to fetch the value from X cell. Assign it in to the other sheet where image is actually being displayed. Maybe you can use this for your purpose. The following code is then triggered by google sheets trigger on a periodic bases.

  // Change certain picture or background images - start
  // Start - A2
  // Select from Master Options - AR2 to AR12
  // Based on values in AR in Master Options, 12 needs to change with it
      const min = 2,
        max = 12; // this can be different for you
      let ss = SpreadsheetApp.getActiveSpreadsheet();

      let randNum = Math.floor(Math.random() * (max - min + 1)) + min;
      let readVal = ss
        .getSheetByName("Master Options")
        .getRange("AR" + randNum)
        .getValue();
      if (!readVal)
        readVal = ss.getSheetByName("Master Options").getRange("AR2").getValue();
      ss.getSheetByName("Start").getRange("A2").setValue(readVal);

OK, thanks for answering. I’m afraid I’m not to that level yet but I’ll keep this in mind, thx!