TL;DR Use RAW Cow to generate a minimalist responsive gallery from RAW files with zero effort. RAW Cow is fast, simple, and requires no installation.
Say you shoot RAW only, and you would like to do this:
- show your files to your clients or followers with zero effort
- take a closer look at your RAW files on a larger screen, without running the files through your preferred RAW processing application first
- quickly publish a no-frills static portfolio of your straight-out-of-camera images
Enter RAW Cow, a PHP-based application that generates a simple responsive gallery out of RAW files. The core of RAW Cow is a PHP script that performs two tasks: 1) it extracts preview images in the JPEG format from each RAW file, 2) and then renders the extracted JPEG files as a no-frills gallery. The script uses Featherlight to display each photo in a simple yet stylish lightbox.
You may be wondering why RAW Cow extracts preview JPEG images instead of converting RAW files. There are several reasons for that. Firstly, the preview files tend to be rather small in size, and they have been already processed in camera. Secondly, automatically processing RAW files with neutral settings would produce rather dull-looking images. Moreover, converting RAW files is a resource-intensive task that takes significantly longer than extracting preview images.
Since RAW Cow works with preview images that are significantly smaller that JPEG files produced by the camera, the application can come in useful even if you shoot RAW+JPEG. Instead of generating a gallery from large JPEG files, you can use RAW Cow to quickly whip up lightweight gallery that loads fast.
You can run RAW Cow on any Linux machine (or Windows machine with Windows Subsystem for Linux installed) with PHP and ExifTool installed on it. RAW Cow relies on the ExifTool tool for extracting JPEG previews, so it must be installed on the system you plan to run RAW Cow on. Also, make sure that PHP is installed on the machine, too.
RAW Cow requires no installation. Using the
git clone https://gitlab.com/dmpop/raw-cow.git command to fetch the project's repository, or download the latest source code from the project's website. In the terminal, switch to the raw-cow directory and launch PHP built-in server using the
php -S 0.0.0.0:8000 command. Point then your browser to 127.0.0.1:800, and you should see the generated gallery. When you add or remove RAW files, you can rebuild the gallery by pressing the Refresh button.
Although RAW Cow is by design a one-trick pony, it does have an extra feature that can literally brighten up the extracted preview JPEG files. With this functionality enabled, RAW Cow runs an automatic level adjustment operation on each JPEG file. To enable this feature, set the value of the
$enable_auto_level variable in the raw-cow/config.php file to true. Since this feature relies on the ImageMagick tool, make sure you have it installed on your system.
Because RAW Cow requires PHP and ExifTool, you can't easily run the application on a regular web host. But RAW Cow provides a workaround. Run RAW Cow on your machine, then upload the JPG directory along with the view.php file to your web server or web host. To keep things tidy, you want to place the JPG folder and the view.php file in a separate directory on your web host. You might also want to rename the file to index.php.