I recommend asking at https://wordpress.org/support/plugin/sell-media#postform so the plugin’s developers and support community can help you with this.
Thanks for your quick reply James. I did ask Sell Media support before I post this query and Sell Media support has confirmed that their plug-in is not modifying images.
I don’t see any other support threads from you here. Would you please give me a link to the thread where they confirmed this?
I sent the query through email. Here is the email conversation.
“
On Wed, Jun 17, 2015 at 6:17 PM, Graph Paper Press <support@graphpaperpress.com> wrote:
Hi Shash,
The image copies for download are generated by WP itself. WordPress uses GD Library or Imagemagick (depending on which is installed) for all its image processing. Add the following line to your theme’s functions.php file to avoid image compression:
add_filter( ‘jpeg_quality’, create_function( ”, ‘return 100;’ ) );
That will work for jpgs. PNGs return as 32 bit files also due to the image processing done by the PHP libraries. PNGs are returned as true color images (24bit for color + 8bit alpha channel)
—
Rick Alday
support@graphpaperpress.com
On Wed, Jun 17, 2015 at 10:34 AM EDT, Shash <@gmail.com> wrote:
> Hello,
>
> I am developing my photography website using sell media on Harmonic theme on localhost. Almost everything is working fine until I downloaded the image I purchased on the localhost through Paypal Sandbox and compared it with the image I uploaded to my website. I have added the code to return to 100% quality for jpeg files but then downloaded jpeg file size is smaller than the uploaded jpeg file size. Most importantly downloaded jpeg was 96 dpi and I had uploaded 300 dpi jpeg. I also checked this with png file format and in this case downloaded file is bigger than the uploaded file. For this png format, uploaded file was 24 bit and downloaded file is 32 bit. So change in file size makes sense but something in the background actually playing with pixels of uploaded images, even the images to be sold or sent to buyers. I just wanted to confirm whether Sell Media processing image, which is to be downloaded by buyer, in the background?
> I am using a tunnel to access my localhost.
> Thanks and regards,
> Shash.
“
Thanks again.
Hm, the originals shouldn’t be touched though, there is no processing done to the original uploaded file, or there shouldn’t be.
Try switching off the re-sizing by setting the dimensions at Settings -> Media to 0, then upload a new image. Is the new image still modified?
I set the parameters in Media Settings as below, but still get the same results (downloaded image is 96 dpi instead of 300 dpi).
Thumbnail size: Width 0 Height 0
Medium size: Max Width 0 Max Height 0
Large size: Max Width 0 Max Height 0
One more thing I found, if I disable gd library and upload a new image and then try to download it with buyer’s download link, it gives 0 kb file (probably no access to wordpress media files in absence of any media library).
Can you install ImageMagick on your server? It’s WordPress’s default and is generally far superior to GD.
Hi James, I checked with ImageMagick (imagick module version 3.3.0RC2) while gd library is disabled. The results are much better as I get (from buyer’s download link) 300 dpi image instead of 96 dpi image (with gd library) but image size is increased to 8.99 MB as against actual uploaded image size of 7.57 MB. So still image sent to the buyer is processed in the background.
This is so confusing, WordPress should not be modifying the original. :/
Are you running any sort of image CDN, like Photon, Cloudflare, etc?
shashphotography – You’re absolutely sure the original image is being altered? There are multiple images and if you’re not linking to the original it can do this.
If you download the image via FTP, does it also have the wrong dpi etc?
My original uploaded jpeg image is 4205×2785 pixels @ 300 dpi (7.57 MB) and image downloaded through link provided to buyer was 4205×2785 pixels @ 96 dpi (1.98 MB).
I will note: PHP is a bit of a dumbass. Images of that size are likely to stall out on upload. Shared hosts, for example, rarely handle images over 3000px in any direction very well.
Also if you have any processing plugins like TinyPNG, it will resize on upload.
Sell Media uses the original image to create a new copy, based on the Price Group sizes, to generate the downloadable files. It only specifies the image dimensions but not the dpi. It uses the “wp_get_image_editor” function as seen here.