question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avatar: support dynamic images (StreamedContent)

See original GitHub issue

It seems to be that one cannot directly use a byte[] image in p:avatar:

<p:avatar image="#{user.profileImage}">

Would be a great addition. Many thanks in advance.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Rapstercommented, Feb 1, 2021

@tandraschko I wonder if it’s a smart move to introduce Avatar with image attribute as it seems it expects a path. One reason is security obviously (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#security_and_privacy_concerns) and another is, most users will fetch from a local cache or db. Instead, i would remove image attr and replace it with value (to be consistent with other components) and expect just like you mentionned a StreamedContent

0reactions
tandraschkocommented, Feb 1, 2021

Removed the image attr and allow p:graphicImage as child. Updates docs and showcase

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic images with StreamedContent - primefaces
I have implemented two StreamedContent beans to dynamic load a graphic image, following the solution found here.
Read more >
Dynamic Image with StreamContent in List - PrimeFaces forum
Hello Everyone, I'm trying to show multiple images, collected in a List, in a data table. This is basically Dynamic Image Streaming.
Read more >
Dynamic images with PrimeFaces - DZone
PrimeFaces is a lightweight library for JSF with regard to its functionality, simplicity, and support. Its power consists in AJAX support, ...
Read more >
Showing a dynamic image that depends on a Request Parameter ...
I'm trying to build a user profile page to show some details about my users. The url of the page is something like...
Read more >
Creating dynamic image streaming programmatically - O'Reilly
Creating dynamic image streaming programmatically With the graphicImage component, it is possible to render an image that is created programmatically in the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found