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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTI5ODAsIm5iZiI6MTczODk1MjY4MCwicGF0aCI6Ii8xMjEzNDY0MS8zMTM4MzczNzgtNDdkNzUwOTAtOGUwOS00MGVmLTk2ZGEtMTY1NTMxN2I4MzA0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE4MjQ0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlOGE0NGQ1ZmRhMmFiNTA1ZWI2ODBjYTM4MWVkN2E2NzhhNjgwMjk4YTZlNzIyODdhZjkzMmIyNWY3YmJjOWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uB91_ePY20Mor4yvGsZhkXE7-hIhtD8RS_FfORpnLwc)
Will generate:
![image](https://private-user-images.githubusercontent.com/12134641/313843748-e0afda6c-48d2-453a-8c64-9f33bbbd014c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTI5ODAsIm5iZiI6MTczODk1MjY4MCwicGF0aCI6Ii8xMjEzNDY0MS8zMTM4NDM3NDgtZTBhZmRhNmMtNDhkMi00NTNhLThjNjQtOWYzM2JiYmQwMTRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE4MjQ0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMzODYwYmE5Yzk1NjQwMGQ5OTdlY2QyN2ZlODI3MmFkOTFkMzQzYzhjMDEyZjg2MGRkMmQ3MDQ3OGQ3MThkMjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iMrLFymASOp-itxw8Tt_SSzK1A-ibnFXkRBwJG1ptFc)
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