Selling Images with EDD

Easy Digital Downloads is designed to make it incredibly easy for you to sell digital files with WordPress. However, depending on the type of file, there are certain things to consider in order to make the process simpler for both the store owner and the customer.

Selling images with EDD creates a situation where the image you're selling also needs to be displayed for the user to preview. Anyone with a little knowledge of how web browsers work can easily download your images without paying.

This documentation is designed to help you prevent such cases.

What makes images different?

The first thing to understand is that EDD protects files that are uploaded through the  Download Files meta box when creating or editing a download. They are placed inside of a special folder on your server that prevents them from being accessed by those who have not purchased them.

This protected folder restricts access to all files  except for a select few. The unprotected file types are outlined in your EDD-generated .htaccess rules.

As you can see,  .jpg.png, and .gif are on the list of file extensions to remain unprotected by default. Reason being, restricting access to these file types will also prevent images from showing on the front-end of your site.

So while .htaccess rules can be modified to protect images, you would then face the problem where your images could not be previewed on the site. Your customers will not know what they're purchasing.

What is the best way to sell images with EDD?

The best solution to this problem is to compress your image files first and upload them that way.  .zip files are protected by default.

If you take this approach, your images can be sold just like any other type of file without any complications.

Previewing Protected Images

Now that your images are compressed and uploaded to the protected folder, you still need a way to display them to your users. You can approach this in a more relaxed manner as the main problem has already been solved.

The first thing to consider is that for most stores that sell images, resolution is important. The higher resolution image is most like the one you've zipped and uploaded to be sold. The preview of your image, which would either be uploaded through the Featured Images feature or directly into your product page content, can be much smaller.

Uploading a smaller version of your image that customers can see makes this an overall two-step process but one that avoids the aforementioned issue. Likewise, chances are the smaller image is not of much value to the customers.

How can I still protect my preview images?

Of course, there are cases where you don't want any of your images, regardless of size, to be of any use to potential customers unless they have made a purchase. Outside of simply not providing preview images, the best solution is to watermark the previews.

The  Download Image Watermark extension allows you to upload a watermark image that gets applied your download images based on the settings you choose. You can easily place a watermark image over every possible size of your preview image, including thumbnails, and still have your main image ready to sell without protection issues.