Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mshafnas's avatar

Display Image From Ajax Response

Hi developers, I am getting the image from ajax response with the header content-type image/jpeg, I would like to display it using the img tag. when I append the src of image to the response. it is not displaying the image.

the response having some weird text and symbols.

can any one guide me to solve this issue. thanks.

0 likes
8 replies
frankielee's avatar

@mshafnas what is not working? Did you find any error from the console? What have you tried? Can you share the codes and the response return from the ajax?

mshafnas's avatar

@frankielee I am not able past the response here since it is having some symbols, the laracast not allowing me to past it.

Please or to participate in this conversation.