The Divi theme’s gallery module is very useful, and by default when you click on each image it opens in a nice pop-up light box effect, but it’s not always what you need.
Sometimes you will only want to use the module to display images, but without an automatic link to the image.
If this is your case it has an easy solution, you just need to add this little code in the additional CSS section of the WordPress customizer (Appearance -> Customize):
/* Remove image links from Divi gallery */
.et_pb_gallery_image a {
pointer-events: none;
cursor: default;}
Code language: CSS (css)
Save the changes and now your image gallery will be displayed as before, but without any link.
If you want to customize its look you can do it already in the design settings of the gallery module.
Read this post in Spanish: Truco Divi: Cómo desactivar el enlace a la imagen en las galerías