I have a template in angularjs expecting the image data uri returned by a server call invoked through the src attribute of the img
angularjs
image data uri
src
img
Perl subroutine:
my $photo = '/9j/4gIcSUNDX....oqOU1MzEFUa8x2MJf5JUjFV3llWW3UVscTLNhd93KFWQUrqHn/ABEc2CfmIASx0nMWLiN5f2hqE//Z'; my $decoded= MIME::Base64::decode_base64($photo); content_type 'image/jpeg'; $decoded;