</> ConvertAtlas Developer Tools
Bootstrap 5 · Advanced

Masonry Photo Gallery

A 3-column masonry photo gallery of varied heights, via Masonry.

Requires Bootstrap 5, Masonry. Add the CDN tags below to your page (styles in <head>, scripts before </body>). The downloaded file already includes them.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js"></script>
<div id="msGal" style="width:360px;max-width:100%">
  <div class="msg-i" style="width:31%"><div class="rounded mb-2" style="height:80px;background:linear-gradient(135deg,#ff7a18,#ff477e)"></div></div>
  <div class="msg-i" style="width:31%"><div class="rounded mb-2" style="height:120px;background:linear-gradient(135deg,#5b6cff,#00d4ff)"></div></div>
  <div class="msg-i" style="width:31%"><div class="rounded mb-2" style="height:90px;background:linear-gradient(135deg,#16a34a,#a3e635)"></div></div>
  <div class="msg-i" style="width:31%"><div class="rounded mb-2" style="height:100px;background:linear-gradient(135deg,#8b5cf6,#ec4899)"></div></div>
  <div class="msg-i" style="width:31%"><div class="rounded mb-2" style="height:70px;background:linear-gradient(135deg,#f59e0b,#ef4444)"></div></div>
  <div class="msg-i" style="width:31%"><div class="rounded mb-2" style="height:110px;background:linear-gradient(135deg,#06b6d4,#3b82f6)"></div></div>
</div>
new Masonry('#msGal',{itemSelector:'.msg-i',percentPosition:true,gutter:8});
Free to use.This component uses Bootstrap 5, Masonry (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.