Web photo album generator
Web developers commonly design photo album pages for websites that consist of a number of image thumbnails on the page. When thumbnails are clicked, a large version of the picture will be displayed. However, to do this, many images are required. Afterwards, copying the <img>
tags, resizing the image to create a thumbnail, placing them in the thumbs
directory, and so on, is a real hurdle. As with any repetitive task, this can be automated easily by writing a simple bash
script. By writing a script, we can create thumbnails, place them in exact directories, and generate the code fragment for <img>
tags automatically in few seconds. This recipe will do exactly this.
Getting ready
We can perform this task with a for
loop that ...
Get Linux Shell Scripting Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.