Comments (4)
Sure, here you are
location ~* ^(/blog/content/images/)(.+)\.(png|jpe?g)$ {
expires max;
alias /var/struchkov.dev/ghost/www/images;
set $webp_image_subdir "/webp/";
set $basename $2;
try_files $webp_image_subdir$basename$webp_suffix $uri @ghost;
}
/var/struchkov.dev/ghost/www/images - full path to images
/var/struchkov.dev/ghost/www/images/wepb/ - full path to webp images
from simply.
wow cool feature, but the size is not always smaller.
For my website images, I use the following formula. I distribute them using nginx bypassing the call to Ghost, I also optimized all the images by losslessly compressing them and making a copy of each image in webp.
Thus, if I have webp, then I give it away, if it doesn’t exist, then I give the picture using nginx, and only if it is not in the folder yet, this happens with new pictures, then we send a request to ghost and it creates pictures in its directories and further they will be distributed from there.
It was for general education, suddenly it will be useful to someone, the essence of my message is different. I had jpg pictures weighing 43 kilobytes, after converting to webp they became all 141 kilobytes, I don’t know why, I also thought that webp should be smaller
from simply.
@uPagge Can you share nginx configuration changes and other settings change you are doing to serve images?
from simply.
By the way, I tried this function, but for some reason my images were not converted using Ghost
from simply.
Related Issues (20)
- Disable membership, keep newsletter
- How can I disable 'next article' and 'prev article' in certain posts?
- dropdown list for any menu item
- Add native comments support HOT 6
- Forwarding to welcome page of tiers not working HOT 4
- Home page template to show Tag based sections HOT 2
- Multiple route.yaml entries? + minor question on dark theme HOT 1
- Dark theme question + mobile optimisation
- german language file has error ( simply/locales/de.json )
- Public preview element is not working HOT 2
- How to change post width? HOT 1
- membership function pages
- Bug when creating an archive page
- Any plans for RTL support
- Removing Title from Header Image
- Is the best forum to get support for Simply? HOT 2
- Publication cover secondaryMenu list of tags no longer visible after upgrade HOT 1
- Latest version of Simply removes Ghost Comments?
- X icon to replace twitter icon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simply.