Image flickering when using @cloudinary/react lazyload after adding alt text
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
- Ambito
- frontend, performance
Direzione di ricerca
Inizia aggiornando @cloudinary/react e riproducendo il problema nel CodeSandbox collegato, in particolare in src/Lazyloading.js intorno alle righe 33-40. Confronta il caricamento con il testo alternativo e con il plugin lazyload dopo più aggiornamenti; il lavoro è completato quando l’immagine non mostra più brevemente il proprio testo alternativo prima di caricarsi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
New issue for cloudinary/frontend-frameworks
Before proceeding, please update to the latest version and test if the issue persists
For which package is this issue?
@cloudinary/react
Describe the issue in a sentence or two.
After adding alt text to an image and adding the lazyload plugin, an image flickering is happening very briefly, as it show the alt text before the image. You can see it here if you refresh the demo a few times: https://codesandbox.io/p/sandbox/lazy-loading-lqip-react-js-sdk-2-0-forked-c3hsk6?file=%2Fsrc%2FLazyloading.js%3A34%2C40
I've tried adding a placeholder too and the issue remains the same. using onError to add a default image as shown here doesn't seem to work as well.
Issue Type (Can be multiple)
[ ] Build - Can’t install or import the SDK
[X] Performance - Performance issues
[X] Behaviour - Functions aren’t working as expected
[ ] Documentation - Inconsistency between the docs and behaviour
[ ] Incorrect Types
[ ] Other (Specify)
Steps to reproduce
Just add an image with alt text and lazyload plugin and then refresh the page a few times and you be able to see it a few times before the image loads
<AdvancedImage
alt="This is the alt text"
key={i}
cldImg={cld.image(image)}
plugins={[lazyload()]}
></AdvancedImage>
Error screenshots
You can see the "This is the alt text" alt text very quickly before the image loads
Browsers (if issue relates to UI, else ignore)
[] Chrome
[] Firefox
[ ] Safari
[ ] Other (Specify)
[X] All
Versions and Libraries (fill in the version numbers)
package SDK version
Node - 18.15.0
NPM - 9.6.7
Config Files (Please paste the following files if possible)
"dependencies": {
"@cloudinary/react": "^1.13.0",
"@cloudinary/url-gen": "^1.19.0",
[...]
}
Repository
- Lingua principale
- TypeScript
- Stelle
- 49
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudinary/frontend-frameworks
-
AdvancedImage/AdvancedVideo crash: "Cannot read properties of undefined (reading 'htmlPluginState')" when unmounted before onMountedForse già presa @strausr l’ha presa 138 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
cloudinary/frontend-frameworks#265 · 1 commento ·
-
HTML Depends on TypeScriptAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 42/100
cloudinary/frontend-frameworks#253 · 5 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
cloudinary/frontend-frameworks#240 · 1 commento · 1 reazione ·
Tutte le issue di cloudinary/frontend-frameworks
Issue simili
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Yeraze/meshmonitor#6407 ·
I maintainer di solito rispondono entro 1 giorno
-
area: install-setup needs-info question
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area:docs documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 12 giorni