wp-media / wp-media/imagify-plugin
Wordpress / nginx - png instead of webp
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 82
- Forks
- 31
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 9
Description
Hej
i have used nginx rule:
location ~* ^(/.+)\.(jpg|jpeg|jpe|png|gif)$ {
add_header Vary Accept;
if ($http_accept ~* "webp"){
set $imwebp A;
}
if (-f $request_filename.webp) {
set $imwebp "${imwebp}B";
}
if ($imwebp = AB) {
rewrite ^(.*) $1.webp;
}
}
because <picture> tag has not displayed images for some users...
i have changed to rewrite rule.. but now there are displayed just png files instead of webp..
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied nginx location block and rewrite rule, checking the request's Accept header and whether the matching .webp file exists. Reproduce a WordPress image request from a browser that supports WebP and compare the response with the original PNG request. Done means supported clients receive the WebP asset while others still receive the original image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx, wordpress
- Domain
- performance, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100