Giter Site home page Giter Site logo

Comments (18)

thegulshankumar avatar thegulshankumar commented on May 20, 2024 4

I can confirm as well about quality loss.

Original: https://gulshankumar.org/wp-content/uploads/2019/05/gulshan-kumar.jpg
Statically: https://cdn.statically.io/img/gulshankumar.org/wp-content/uploads/2019/05/gulshan-kumar.jpg

from statically.

Deliciae avatar Deliciae commented on May 20, 2024 1

I have the same issue:

Original: https://explorista.nl/wp-content/uploads/2019/08/MilouHuis3.jpg
Statically: https://cdn.statically.io/img/explorista.nl/wp-content/uploads/2019/08/MilouHuis3.jpg

from statically.

adrien-robert avatar adrien-robert commented on May 20, 2024 1

I can confirm the quality lose even with quality=100

from statically.

fransallen avatar fransallen commented on May 20, 2024 1

Hi Gijo,

Understood. Increasing the max quality of JPG will solve this problem. The image will still be processed but does not reduce quality. I will try to do the work this morning.

Best,
Frans

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024 1

ok. I'm closing the issue since the original issue is fixed.

Congrats and thanks, Frans! 👏

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

The issue is still there

from statically.

fransallen avatar fransallen commented on May 20, 2024

Hi everyone!

Many thanks for the query and sorry for such a late response!

Compression is enabled by default, so maybe that's why the image quality decreases even with quality=100. I will try to increase the default max quality for JPG images without increasing the file size, the current is 85%.

In the near future, I will make improvements to the image server to make it more reliable. But this is such a big job, it would be awesome if you'd consider donating through BountySource so that I can free up time to implement a much improved Statically Images.

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

@fransallen i would suggest to deliver uncompressed images when quality query is not specified. This is what everyone expects and assume.

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

@fransallen a lot WordPress users might have already compressed their images before integrating Flying Images/Statically

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

@fransallen ok, pls let us know once it is done.

Also, the entire cache will be purged after this?

from statically.

fransallen avatar fransallen commented on May 20, 2024

Hi @gijo-varghese. I have been able to fix this problem, but right now I'm trying to apply the proper rules on the edge. I will update you in the shortest possible time.

In the meantime, please test this experimental URL, currently limited to width (w), height (h), and quality (quality) functions only.

https://cdn.statically.io/experimental/img/wpspeedmatters.com/wp-content/uploads/2019/08/flying-birds-1160x680.jpg
https://cdn.statically.io/experimental/img/wpspeedmatters.com/wp-content/uploads/2019/08/flying-birds-1160x680.jpg?w=600
https://cdn.statically.io/experimental/img/wpspeedmatters.com/wp-content/uploads/2019/08/flying-birds-1160x680.jpg?h=500
https://cdn.statically.io/experimental/img/wpspeedmatters.com/wp-content/uploads/2019/08/flying-birds-1160x680.jpg?quality=85

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

@fransallen yes, this looks much better!

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

@fransallen any updates?

from statically.

fransallen avatar fransallen commented on May 20, 2024

Hey, good news everyone! Frans is got this fixed.

@gijo-varghese would you update the purge request link on Flying Images plugin with https://statically.io/purge? This will give the internal team a better workflow to help purge the cache.

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

@fransallen yes. I'll update the link.

So everyone has to purge the cache to get the new changes?

Also, I tried adding a version=x to Statically URL, expecting a new image will be delivered for change in "x". But look like Statically doesn't cache based on query strings. Can you pls confirm this?

If so we can provide users with two options:

  1. Purge entire cache (version will be incremented)
  2. Purge cache by files (contact Statically)

What do you think?

from statically.

fransallen avatar fransallen commented on May 20, 2024

Caching each query string will only damage the HIT ratio, I hardly suggest renaming the file instead.

  1. How does purge entire cache work? Unfortunately, wildcards are not supported with a single URL purge at this time.
  2. Yep, use purge page please. With notes, this won't be fast.

from statically.

gijo-varghese avatar gijo-varghese commented on May 20, 2024

@fransallen people might have thousands of images in their WP. Since the above quality issue is fixed, what should they do to purge the entire cache?

In situations like these, it's better to increment a version and serve new files. Yes, it will reduce cache hit ratio, we can warn users about it. But I think there should be a way to purge the entire cache.

from statically.

fransallen avatar fransallen commented on May 20, 2024

I'm referring to the Statically cache hit ratio, warn users might not be necessary. Because we don't want to hurt our cache hit ratio, so we normalize requests and remove query strings that have no effect on our apps, that's why adding a miscellaneous query string won't change the image that has already been cached.

Currently, there is no way to purge the entire cache from a URL path, it must be an exact URL(s). I certainly understand what we need is a way to clear cache on /img/example.com/*, but I am unable to provide it at this time.

There are a few tricks to getting a new version of file (even though thousands of images are on WP):

  • Play with registered query strings such as quality, w, and h. The new quality query will be more than enough to serve low-quality images without much-reducing image quality, so it's no problem to change it now.
  • Use ?ssl=1 to force Statically download images from the HTTPS protocol.
  • Rename the uploads folder.

There are still many ways to get a new version of image without having to purge cache. But let me know if there are other questions from your side Gijo.

from statically.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.