der = new GIFBuilder({source: 'images', width: 400, height: 400});

    for (const image of images) {
      await gifBuilder.add(image);
    }

    try {
      const gifDataUrl = await gifBuilder.build();
      animatedImage = document.createElement('img');
      animatedImage.src = gifDataUrl;
      document.body.appendChild(animatedImage);
      elStatus.innerHTML = '...GIF generation completed';
    } catch (error) {
      elStatus.innerHTML = `...GIF generation failed: ${error}`;
    }
  }

  main();
</