• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • ๐Ÿ˜Œ This community is user driven. Be polite with other users.
    • ๐Ÿ‘‰ Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • ๐Ÿ’ธ Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • โš ๏ธ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • โœ… Confirm that the server meets the System Requirements
    • ๐Ÿ”ฅ Check for any available Hotfix - your issue could be already reported/fixed
    • ๐Ÿ“š Read documentation - It will be required to Debug and understand Errors for a faster support response

Compressed Original Image File?

Andy

Chevereto Member
Hi,

I'm wondering if I upload an image to Chevereto site, will it converted or compressed?

Because the original Image size was 180kb, but after I uploaded to Chevereto site, even though I'm using the original image link it went down to 70kb.

Is there any way to keep the original image size without compression?

Thank you.
 
When watermarking is enabled there will be always a difference. Same goes if the user want to remove the Exif data. If nothing is removed or added to the image the image won't be compressed. Don't ask to keep the same size + watermark or minus Exif data. Can't be done.
 
I don't remove exif data nor give watermark, image size should be same right?
But it's different, it's compressed.
 
Chevereto doesn't compress the image on the situations I mentioned it. If you get it different then check your Chevereto and server settings.

I don't need to debug anything because I know that the system doesn't do what you are describing.
 
@Rodolfo I tested this on my site and I am seeing a similar result, however I think it's a bug in the download button code and not that Chevereto is "touching" the image.

OS: Windows 10
Browser: Chrome v45.0.2454.101 m
Image (NSFW!): https://www.picsgonewild.com/image/hDMCt

Here is what I did...

1) Grabbed a fresh image from an outside source
2) Confirmed the image file size on local PC (224KB)
3) Uploaded said image to my Chevereto install
4) Went to said images page on my Chevereto install
5) Clicked the download button
6) Image downloaded, however the size of the file is indeed smaller than original (146KB)
7) Hovered my mouse over the image and expanded/zoomed/magnified the image (I believe this makes it full size, correct?)
8) Clicked the download button
9) Image downloaded and matched the original size for which I uploaded (224KB)

Hope that helps!

----
EDIT
----

Tested a couple more browsers...

Mozilla FireFox v41.0.1 - I get the smaller image no matter if the image is expanded/zoomed/magnified or not, so completely broken here?
Microsoft Edge - When clicking download it directs to the direct image link as opposed to downloading so maybe a new issue there?

----
EDIT #2
----

I uploaded the same image to Chevereto Demo site (http://demo.chevereto.com/image/UrI) and confirmed the issue doesn't exist there.

So the issue is apparently on my/our side, however no idea where it would be coming from unless is CloudFlare playing hanky panky with my images for some reason.
 
Last edited:
PC doesn't always use the right size measurement. First of all, lets see if the image gets compressed in the demo:

size_windows10.PNG

It is the exact same image, even when this image was saved on top of the demo's CDN (MaxCDN). Windows reports that the image size is 47667 bytes, and Chevereto says 47667 which is exactly the same.

size_full.PNG

Finally, how many KB are 47667 bytes? Simple, divide it by 1000 and you get 47.7 KB. So where MS got that 46.5 KB? They got that by dividing bytes/1024 but that is not KB that is KiB which is a different measurement.

Chevereto is not compressing anything and MaxCDN in my case is also not compressing anything. If you get a different result then is your CDN (CloudFlare mostly) or maybe your server which is doing that for you.

Hope that now this gets clear.
 
PC doesn't always use the right size measurement. First of all, lets see if the image gets compressed in the demo:

View attachment 624

It is the exact same image, even when this image was saved on top of the demo's CDN (MaxCDN). Windows reports that the image size is 47667 bytes, and Chevereto says 47667 which is exactly the same.

View attachment 625

Finally, how many KB are 47667 bytes? Simple, divide it by 1000 and you get 47.7 KB. So where MS got that 46.5 KB? They got that by dividing bytes/1024 but that is not KB that is KiB which is a different measurement.

Chevereto is not compressing anything and MaxCDN in my case is also not compressing anything. If you get a different result then is your CDN (CloudFlare mostly) or maybe your server which is doing that for you.

Hope that now this gets clear.

I updated my post a few times above as well, but it does appear to be CloudFlare causing the issue on my side.

Presently, if I right click and save the image I get the full size, however if I use the download button I get the CloudFlare touched one which is quite a lot smaller.

Any chance a work around can be added to Chevereto to account for CloudFlare?
 
Any chance a work around can be added to Chevereto to account for CloudFlare?

The download button is just a HTML 5 download attribute that points the browser to save the file, same thing as right-click then "save as". In your case, both "save as" and download button gave me a compressed image and it should be caused by Cloudflare. There are things that Chevereto can't manage like how much aggressive will be the CloudFlare cache or what your browser (or even your browser extensions) are doing for you, at the end you are asking me to do things that at script layer you can't control.

Refer your issues to CloudFlare and tweak your image settings because Chevereto is not the one messing with your images.
 
The download button is just a HTML 5 download attribute that points the browser to save the file, same thing as right-click then "save as". In your case, both "save as" and download button gave me a compressed image and it should be caused by Cloudflare. There are things that Chevereto can't manage like how much aggressive will be the CloudFlare cache or what your browser (or even your browser extensions) are doing for you, at the end you are asking me to do things that at script layer you can't control.

Refer your issues to CloudFlare and tweak your image settings because Chevereto is not the one messing with your images.
Rodolfo, I realize the issue is being caused by CloudFlare, I am not blaming you in any way shape or form...please don't take any of my comments the wrong way.

Presently CloudFlare is indeed optimizing the images on the fly in order to assist in page load times and as it stands now I don't believe that should be changed. Very few visitors will notice the images have been optimized and even fewer will ever download the image which leaves the effects by CloudFlare desired as in the long run Chevereto will load faster and save money on bandwidth.

That said, when an image is downloaded I would indeed like to see the user receive the untouched version, however presently that's not possible as CloudFlare seeing the image request from the download button like any other web browser request leaving the user to receive the touched version.

My thinking is if the Chevereto download function was changed a little we could avoid this issue completely without having to go back and forth with CloudFlare or work on setting cache-control headers on every request.

My thought would be instead of the HTML 5 function in place now it be replaced with a temporary php link. So when the user clicks download the browser and CloudFlare would see www.hhhh.com/download.php?840 as opposed to a direct link to the image which from my understanding would bypass the compression & caching done by CloudFlare as long as the URL changes with each request allowing it to remain unique.

Beyond the above, I have already opened a ticket with CloudFlare as well, but based on my past conversations with them I highly doubt anything can be done without a change in Chevereto.
 
My thought would be instead of the HTML 5 function in place now it be replaced with a temporary php link

That could open a huge gap for DDoS attacks because PHP is several times more expensive (in load) than a GET request over a static file.

I won't add an image downloader just to avoid CloudFlare optimization issues. CloudFlare should let you choose if you want to compress the images or not. If the problem is that the file says 200 KB and when downloaded is just says 199 KB then just remove the size indicator if that bothers you.

I don't think that the small difference in bytes is something to actually worry about and is the price you pay for using an aggressive optimization service. I use MaxCDN and there is no compression at all because it works in the way it should be.
 
Last edited:
That could open a huge gap for DDoS attacks because PHP is several times more expensive (in load) than a GET request over a static file.

I won't add an image downloader just to avoid CloudFlare optimization issues. CloudFlare should let you choose if you want to compress the images or not. If the problem is that the file says 200 KB and when downloaded is just says 199 KB then just remove the size indicator if that bothers you.

I don't think that the small difference in bytes is something to actually worry about and is the price you pay for using an aggressive optimization service. I use MaxCDN and there is no compression at all because it works in the way it should be.
Understood.

CloudFlare does indeed allow you to disable the optimization of images to a pretty large degree, however in doing so it will impact the load time and size of each web page for no real gain especially when the only time the original size would really matter is when a user would download it. Serving a more optimized image seems perfect and then providing an untouched one for download.

Once I hear back from CloudFlare I will share it hear to see if there are any further steps that can be easily added to Chevereto (ie. maybe adding a tag to the HTML 5 code so CloudFlare knows not to cache that action) that wouldn't open the system up to adverse effects such as the DDOS attack you noted.

At the end of the day it would really be ideal for Chevereto to play very well with CloudFlare considering a HUGE chunk of the websites online today use it, especially major ones even like Reddit and Imgur.
 
The download button is the same thing as the save-as context menu, I don't know where did you read that is a different request or something. Remember that CloudFlare is a distributed cache, it means that most of the time it serves content from the closest server available but sometimes it just access directly to the content (rarely).

You must understand that CloudFlare is not a CDN, it is an optimization service which works at very aggressive levels and it doesn't follow any standard. They just do they things on their own and for this case their solution will be something like that Chevereto should update the image_size field to match their value, that is totally out of the question I won't do that.

We have medium sized images that saves a lot of traffic when viewing a list of images, and if you open an image the same image that loads in the background is the one that you download so no extra requests are made, the process is instant because the image is already in the browser cache. Have you thought that having 2 different images (compressed + real) will cause two requests instead of just one so it will be almost twice the traffic for the very same action?

P.S. Imgur uses EdgeCast. Several people use CloudFlare just for their DNS service and actually at Cheveteto I use CloudFlare only for their DNS. Not because my DNS points to CF it means that they deliver my static files or anything else
 
Last edited:
The download button is the same thing as the save-as context menu, I don't know where did you read that is a different request or something. Remember that CloudFlare is a distributed cache, it means that most of the time it serves content from the closest server available but sometimes it just access directly to the content (rarely).

You must understand that CloudFlare is not a CDN, it is an optimization service which works at very aggressive levels and it doesn't follow any standard. They just do they things on their own and for this case their solution will be something like that Chevereto should update the image_size field to match their value, that is totally out of the question I won't do that.

P.S. Imgur uses EdgeCast. Several people use CloudFlare just for their DNS service and actually at Cheveteto I use CloudFlare only for their DNS. Not because my DNS points to CF it means that they deliver my static files or anything else
I am not noting its a different request, rather how CloudFlared is interpreting and then serving the request.

I will be doing a little more testing when I am back in front of my PC, but when I was testing earlier each time I right clicked and saved the image I would end up with the original whereas when using the download button I would receive the CloudFlare optimized version which is why I noted I believe CloudFlare is interpreting the download request as if it was any other image request hence the optimized image being downloaded. To that end its why I noted in my last response that a small change may be needed to be made to Chevereto to "flag" the download request so CloudFlare either passes to the origin or serves the original image. I haven't found anything in their wiki on such a topic beyond using cache-control headers to notify CloudFlare certain content is to remain uncached, however I don't think that will solve anything here.

Beyond the above, I believe I have a decent handle on how CloudFlare works in general, however if you are seeing that I am way off base please do let me know where I am wrong as I am always happy to learn.
 
The flag that you mention doesn't exists, the download attribute is just a shortcut of the "Save as" command. The only workaround will be to add a query string at the end of the image url like ?download but if CloudFlare doesn't play with it there is nothing to do.

This is an external service which must give me tools to work with, if they don't then I can't do anything. Also, "no-cache" is related to the request not the content. If they serve the content compressed then doesn't matter how many different headers you sent. They must add a workaround to get the original file and if they do I will be happy to add it.

So, If CloudFlare add this then let me know.
 
Last edited:
The flag that you mention doesn't exists, the download attribute is just a shortcut of the "Save as" command. The only workaround will be to add a query string at the end of the image url like ?download but if CloudFlare doesn't play with it there is nothing to do.

This is an external service which must give me tools to work with, if they don't then I can't do anything. Also, "no-cache" is related to the request not the content. If they serve the content compressed then doesn't matter how many different headers you sent. They must add a workaround to get the original file and if they do I will be happy to add it.

So, If CloudFlare add this then let me know.
Learned something new :)

Ticket has been opened with them and when I hear back I will be sure to share either good or bad.

Thanks!
 
@LEckley: I just checked one of my host that is running with CF:

http://i.site.pictures/gN0d.jpg (original image file)
File Size on Chevereto: 407230 bytes
http://site.pictures/image/gN0d

Here's the CLI output from the server:
Code:
root@svr2:/home/site/public_html/i# ls -al gN0d.*
-rw-r--r-- 1 site site 407230 Oct  3 14:27 gN0d.jpg
-rw-r--r-- 1 site site  50076 Oct  3 14:27 gN0d.md.jpg
-rw-r--r-- 1 site site  11288 Oct  3 14:27 gN0d.th.jpg
root@svr2:/home/site/public_html/i#

I think sometime when we upload we got the exact file size but sometime it's compressed. I don't know what's wrong.
 
@LEckley: I just checked one of my host that is running with CF:

http://i.site.pictures/gN0d.jpg (original image file)
File Size on Chevereto: 407230 bytes
http://site.pictures/image/gN0d

Here's the CLI output from the server:
Code:
root@svr2:/home/site/public_html/i# ls -al gN0d.*
-rw-r--r-- 1 site site 407230 Oct  3 14:27 gN0d.jpg
-rw-r--r-- 1 site site  50076 Oct  3 14:27 gN0d.md.jpg
-rw-r--r-- 1 site site  11288 Oct  3 14:27 gN0d.th.jpg
root@svr2:/home/site/public_html/i#

I think sometime when we upload we got the exact file size but sometime it's compressed. I don't know what's wrong.
It's CloudFlare causing the discrepancies, once disabled it goes away completely.

You will need to disable the image optimization through them in order to clear everything up.

@Rodolfo - I spoke with CF via support ticket and they note there isn't a query string option or really any options available beyond disabling image optimizations via page rules or disabling caching all together.
 
@Rodolfo - I spoke with CF via support ticket and they note there isn't a query string option or really any options available beyond disabling image optimizations via page rules or disabling caching all together.

Then at my end I can't do anything.
 
Back
Top