0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

fix(assets): Implement all hooks in the passthrough image service (#9668)

* fix(assets): Implement all hooks in the passthrough image service

* chore: changeset
This commit is contained in:
Erika 2024-01-11 13:29:59 -05:00 committed by GitHub
parent 87ede76b3b
commit 74008cc238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Fix the passthrough image service not generating `srcset` values properly

View file

@ -2,11 +2,8 @@ import { baseService, type LocalImageService } from './service.js';
// Empty service used for platforms that neither support Squoosh or Sharp.
const noopService: LocalImageService = {
...baseService,
propertiesToHash: ['src'],
validateOptions: baseService.validateOptions,
getURL: baseService.getURL,
parseURL: baseService.parseURL,
getHTMLAttributes: baseService.getHTMLAttributes,
async transform(inputBuffer, transformOptions) {
return {
data: inputBuffer,