- 🇩🇪Germany Anybody Porta Westfalica
@cilefen Just ran into this on a totally different server and hoster again. Should we consider adding this to the .htaccess until it's resolved upstream? (Eventually add a comment for that above)?
- 🇷🇴Romania bbu23
I got this issue as well, but it's strange because I had this scenario:
1. Added the crop effect to my image style
2. Navigated the site as logged in user
3. Network was showing that the webp images were loading as type webp
4. Switched to anonymous user and network was showing jpg, png etc.
5. Ran drush image:flush all then network was showing webp again
6. But then if went back to logged in, we're back to square one :) - 🇺🇦Ukraine arialblack
<IfModule mod_mime.c> AddType image/webp .webp </IfModule>
Solved my problem with Lighthouse.
- 🇺🇸United States SocialNicheGuru
Is this only an issue for apache2 servers? Nginx does not have .htaccess files
- 🇸🇰Slovakia poker10
@Anybody, any chance that it is related to this issue?
🐛 Incorrect headers for image derivative if file stored in private filesystem Needs work
- 🇩🇪Germany Anybody Porta Westfalica
- 🇦🇹Austria hudri Austria
+1 for this patch, my live host had the same issue. The images are correctly converted, just the returned mime type was incorrect. It seems many hosts don't properly configure mime types.
- First commit to issue fork.
- Merge request !7674Issue #3310963: Attach correct image/webp header in .htaccess when mime module is enabled → (Open) created by rcodina
- 🇪🇸Spain rcodina Barcelona
I added a new branch which comes from latest 11.x and I added there the patch on #17. The old branch had too many conflicts with 11.x so I have hidden it.
I confirm the patch works on Drupal 10.2.2 but I have to apply it manually. I also confirm the problem happens only under apache, under nginx it does not happen.
- 🇲🇽Mexico rmontero CMDX
@rcodina do we still need to re-roll the patch so you don't need to apply it manually?
What are the next steps here? Happy to help, big fan of WebP.
- 🇪🇸Spain rcodina Barcelona
@rmontero The patch on #17 missed to change the scaffold version of .htaccess but I did it in the issue branch I created to pass all the core tests. The MR is now fine, so there is nothing more to do. Maybe core maintainers will request us to add a test but I don't know where to begin because it's a problem which only happens under apache server and I'm not used to add core tests.
On the other hand, depending on core version, it's normal that some patches have to be applied manually. So don't worry.
- Status changed to Needs review
8 months ago 1:18pm 26 April 2024 - Status changed to RTBC
7 months ago 3:19pm 15 May 2024 - 🇺🇸United States smustgrave
Reading the threads believe the MR is on track.
As far as tests go I also don't know if we test specific setup like that. Will mark then.
- 🇺🇸United States joegraduate Arizona, USA
Uploading a patch usable with composer for projects using drupal/core-recommended and drupal/core-scaffold that only updates the scaffold files version of the file.
- 🇺🇸United States mfb San Francisco
FWIW, I checked the apache httpd source to make sure they do have webp in the default mime.types file, and it was added 13 years ago... https://github.com/apache/httpd/commit/217485c7e1f2f499049b4ff745076e4ed...
- 🇺🇸United States mfb San Francisco
@Anybody ok so you're using ubuntu /etc/mime.types, not apache. In that case, looks like webp was added more recently, in January 2023, i.e. in Ubuntu 23.04 - https://salsa.debian.org/debian/media-types/-/commit/6883baf645560bcfe0a... - so it's finally fixed there too
- Status changed to Needs work
7 months ago 9:56am 24 May 2024 - 🇳🇿New Zealand quietone
This should have a more informative title, one that explains the change. This makes a huge difference with searching git logs.
Perhaps something like, "Attach correct header in .htaccess when mime module is enabled".
- 🇩🇪Germany Anybody Porta Westfalica
@quietone like this?
I sadly don't have the permission to change the MR title / commit message.
- Status changed to Needs review
7 months ago 7:48pm 5 June 2024 - Status changed to RTBC
7 months ago 9:42pm 5 June 2024 - Status changed to Needs work
6 months ago 10:29am 12 June 2024 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
All .htaccess changes need
- a change record, for example https://www.drupal.org/node/3351478 →
- a release note in the issue summary, for example https://drupal.org/node/3336463
- 🇺🇸United States joegraduate Arizona, USA
Added draft CR and release notes snippet.
- Status changed to Needs review
6 months ago 8:53pm 21 June 2024 - Status changed to RTBC
6 months ago 12:45am 22 June 2024 - 🇺🇸United States smustgrave
Release notes and CR added, CR correctly added for 10.4.x also.
- 🇺🇸United States xjm
Actually I don't think the CR should necessarily be for 10.4.x. Maintenance minors should only include four kinds of changes:
- Security and upgrade path fixes.
- Non-disruptive bug fixes that are backported to patch releases.
- Dependency updates and PHP compatibility fixes.
- Important API additions and deprecations for contrib compatibility across Drupal 10 and 11.
This doesn't seem to fall into any of those categories. I think this is probably an 11.1 fix only, since we're making an addition to the default
.htaccess
? - Status changed to Needs review
5 months ago 11:29pm 21 July 2024 - Status changed to RTBC
5 months ago 2:08pm 29 July 2024 - 🇺🇸United States smustgrave
Believe feedback from @larowlan has been addressed.
- 🇳🇿New Zealand quietone
This looks fine, all questions answered. I did update the CR to remove the diff and simplified the title. Adding tag for 11.1.0 release notes and updated credit.
- Status changed to Needs review
4 months ago 12:38am 10 August 2024 - Status changed to RTBC
4 months ago 1:26pm 12 August 2024 - 🇺🇸United States smustgrave
Would say it could go back to RTBC. Comments were added for the 1 thread.
- 🇳🇿New Zealand quietone
There were out of scope changes here and instead of setting back to NW I decided to fix that. Then I forgot that there are two .htaccess files to keep in sync. All should be fine now. Leaving at RTBC
-
longwave →
committed 30bea1eb on 11.x
Issue #3310963 by rcodina, quietone, anybody, joegraduate, smustgrave,...
-
longwave →
committed 30bea1eb on 11.x
- Status changed to Fixed
2 months ago 12:49pm 21 October 2024 Automatically closed - issue fixed for 2 weeks with no activity.