Image flickering when using @cloudinary/react lazyload after adding alt text
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- react, typescript
- Bereich
- frontend, performance
Rechercherichtung
Beginne damit, @cloudinary/react zu aktualisieren und das Problem im verlinkten CodeSandbox zu reproduzieren, insbesondere in src/Lazyloading.js um die Zeilen 33-40. Vergleiche das Laden mit Alt-Text und dem Lazyload-Plugin über mehrere Aktualisierungen hinweg; abgeschlossen ist es, wenn das Bild vor dem Laden nicht mehr kurz seinen Alt-Text anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 49
- Forks
- 17
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cloudinary/frontend-frameworks
-
AdvancedImage/AdvancedVideo crash: "Cannot read properties of undefined (reading 'htmlPluginState')" when unmounted before onMountedEvtl. vergeben @strausr hat das vor 138 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
cloudinary/frontend-frameworks#265 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 42/100
cloudinary/frontend-frameworks#253 · 5 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
cloudinary/frontend-frameworks#240 · 1 Kommentar · 1 Reaktion ·
Alle Issues in cloudinary/frontend-frameworks
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
devswha/herdr-web-ui#3875 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
-
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
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
discovery:other factory-active task-identify-harness-labels-done task-identify-issue-type-done
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
vercel/ai#25068 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
create-strapi-app doesn't await writing license.txt, so a failed write skips its error handlingOffenflag: invalid template issue: bug severity: low source: cli status: pending reproduction version: 5
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
strapi/strapi#28637 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen