I think you confuse the name of the photo with its content, the "blob" as per your title.

1. Does your DB store the filenames (of files which are stored locally) of photos which can be retrieved by ID? Then it is a matter of your perl cgi script to adjust your img src to point to that local filename given the photo ID.

2. Does your DB contain the actual image content as a blob/binary data? Which you want your perl script to retrieve by id and then send over (the actual binary data) all the way to the client's browser and in particular to that img? Then you need something more advance for your src=. Your perl CGI script must send over the image binary data using the appropriate headers Content-type: image/jpeg...

But I will leave you to more expert hands: read this How can I use a CGI script to return an image?

bw, bliako


In reply to Re: blob output by bliako
in thread blob output by bigup401

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.