How to create product images slider in Shopify?

1. First, get the productHow to create product images slider in Shopify?

<div class="product_image_slider_mobile">
   <div class="product_images_slider">
      {% for image in product.images %}
         <img src="{{ image.src | product_img_url: '500x' }}">
      {% endfor %}
   </div>
</div>

2. You need to use the product image main div class in the below JS code.c

<script>
      $('.product_images_slider').slick({
        infinite: true,
        dots: true,
        slidesToShow: 1,
        slidesToScroll: 1,
        autoplay: true,
        autoplaySpeed: 2000,
        responsive: [
          {
            breakpoint: 768,
            settings: {
              slidesToShow: 1,
              slidesToScroll: 1
            }
          }
        ]
      });
</script>

You can edit code according to your requirements.