NuxtImage: Custom Providers and duplicate srcset #1290
Unanswered
Phillocity
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm not sure if its a bug but srcset currently duplicates for me so if I've added a size of xs:360px it will return with a srcset that contains 360w and adds 720w. This can be seen here https://stackblitz.com/edit/nuxt-starter-jx7mvs?file=app.vue
These settings:
![image](https://private-user-images.githubusercontent.com/12134641/313837378-47d75090-8e09-40ef-96da-1655317b8304.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTgzMjUsIm5iZiI6MTczOTMxODAyNSwicGF0aCI6Ii8xMjEzNDY0MS8zMTM4MzczNzgtNDdkNzUwOTAtOGUwOS00MGVmLTk2ZGEtMTY1NTMxN2I4MzA0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDIzNTM0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkOGQwNGEzMTk0ODYzMjk5ZDgxOWEyZjc2ZDdlOWUxMWZkYzA0MGIxYmFlMDc4NDU0OTJmY2RjNmYzNTliZDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.OTgdrFMUNscodo8AUYaf8TX5DunPcWdi0JqfoaEaxck)
Will generate:
![image](https://private-user-images.githubusercontent.com/12134641/313843748-e0afda6c-48d2-453a-8c64-9f33bbbd014c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTgzMjUsIm5iZiI6MTczOTMxODAyNSwicGF0aCI6Ii8xMjEzNDY0MS8zMTM4NDM3NDgtZTBhZmRhNmMtNDhkMi00NTNhLThjNjQtOWYzM2JiYmQwMTRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDIzNTM0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZhMGY4NzY0YTU3ODg4NjlkYjU2MDgyMWE1MDZkOGU2OTQwNjBkMmVjN2U5NjZhZmViMjIyYjg3YWZmYzlmM2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.BH5411KHlGfS1ZHFsRHCgmxpUDz3tFrC84J9DUJYkiA)
Is this by design or a bug? That aside I'm currently writing a custom provider and it works for singular src. But in the event of a srcsets is there anyway to handle this within the custom provider besides generating srcset with a computed on the template?
Beta Was this translation helpful? Give feedback.
All reactions