Display Image from the database but prevent it from refreshing on every pages

Hi there,
I can see there are many discussions around this but my query is slightly different. I'm writing this on behalf of one of my developers. (sorry for my ignorance on techie stuff.. :-))
A logo is being displayed on a few pages, which is called from the database. However, the problem is that  - this logo refreshes every time when you traverse to each page causing a performance issue or sometimes slow loading of the image.
My question is - how do we stop it from loading on each page from the database?.  I would rather load once when the main page loads initially and then maintain this on other pages too.
We can keep this logo on a file system (FS)  and display it via CSS/HTML/frame but since we want to keep it flexible/dynamic where a user can upload a new one whenever it changes and hence DB seems to be the suitable option (in my opinion).
Can someone please help?
If you need any further info around the coding how it is being done at present, pls let me know.
Thank you

read this http://docs.oracle.com/cd/B28359_01/appdev.111/b28393/adlob_tables.htm#g1017777
you can cache lobs in the database too
you can also upload the pic in your file system using utl_file package and then put the image in the working directory mentioned in i.war
you can then reference the image and it will not be stored in the database and will be cached
Regards,
Vishal
Oracle APEX 4.2 Reporting | Packt Publishing
Vishal's blog

Similar Messages

  • My iphone 4s suddenly displays images from Yahoo, Google, and Flickr at low resolution. The camera on my phone works fine, but any web related photo content is now pixelated and low res, what's the deal?

    My iphone 4s suddenly displays images from Yahoo, Google, and Flickr at a low resolution. I have IOS 7.0.4. My phone camera works fine, but any web based photo content from Safari, Yahoo images, Google images, and Flickr all come in pixelated and low res. What's the deal?

    It happened to me but later I figured out that cellular signal was not that great and so the Internet was very slow. It took me about 2 minutes to get the full resolution picuture on either of the app you've described. Try to get faster internet either by wifi or good signal and then check.

  • Display Images from Database

    Hi all,
    I require to display images stored in database along with textual description of it on a JSP.
    The image file should not be stored intermediately on file system (i.e w/o using img HTML tag)
    It is a typical shopping cart appln. where images are fetched from database and the associated description is displayed along side.
    Please note that it is the case of Mixed content types(text and binary data).
    Thanks and Regards

    Like "Breakfast" said, you can do this with a servlet that retrieves your images from a database....
    if you create a servlet to do this, you would have a generic servlet which retrieves a picture from a database based upon a key which could be a picture name or number.
    Lets say the file is out there in the database as a BLOB or Binary Image... you could have this kind of code in the doPost(HttpRequest req, HttpResponse res) or doService(HttpRequest req, HttpResponse res) method.
    The table holding the image has at least two columns one called IMAGE which holds the binary image and the other called FILENAME. If the connection to the DB is already open, you do something like this.
    String fileToGet = (String)req.getParameter("FILENAME");
    rs = conn.createStatement().executeQuery("select from IMAGE_TABLE where FILENAME='" + fileToGet + "'");
    if(rs.next())
    InputStream in = rs.getBinaryStream("IMAGE");
    res.setContentType("image/jpg"); // or whatever type of file it is.
    ServletOutputStream sout = res.getOutputStream();
    int c;
    while((c = in.read()) != -1)
    sout.write(c);
    in.close();
    sout.close();
    This should write your image to the response output of the servlet.
    Now, where you want your image, you put.
    <img src="/servlet/ImageServlet?FILENAME="thefileIwant">
    This should do what you want... Use your favorite pipe copy method to get the input stream to the output stream. If you are worried about overhead and scaling like "breakfast" said (it CAN be a problem in high access sites), then you can add an image caching scheme and get really complex.... But this is a rough idea on what to do.
    Hope this helps.
    Stephen McConnell

  • Displaying image from database in report

    I need to include a picture (company logo) in numerous reports. This logo will be stored in an MS SQL Image field in a table (this bit I have already sorted out).
    What I'm wondering is, what is the best way to retrieve this image from the database? Do I just include it in the view the report runs off? I'm hesitant to do this, as the view may return back hundreds of records, which means (I think) it will be sending the image along with it hundreds in time.
    In short:
    1) What is the best way to pass an image to a report.
    2) If I include the Image field in a view which returns back hundreds of line, will the image be returned also hundreds of time, causing network congestion/performance issues?
    3) If so (2), is there a way of sending the image only once, no matter how many rows are in the returned view?
    Thanks.

    Hi Shanon,
    We can display the image by making it a local copy on your machine.
    If it is possible to  get the image saved on local copy.
    If we place the image in detail section then it would return one record.
    As the image is from Database, so it would hit the database very time when you refresh the report and place it in Report Header or report fotter.
    So, place your logo as an OLE object in report and would reduce processing time.
    Regards,
    Naveen.

  • Displaying image from database table.

    Hi All,
       I am very new to Web Dynpro ABAP.
      I am developing an application to display an image in "Image" UI Element.
      For this I have one table consisting of fields image id, image data and image name. here image id is primary key field.
    Now i want to display an image from that table in "Image" UI Element. For this i am using "Filedown load" UI element.
    But by using filedownload ui element i can diaplay image in another new page.
    But my requirement is to display image in the same web page without creating a new one.
    (I want to display the image in "Image" UI element without storing that image in MIME objects.)
    Can anyone help me.
    Thanks in Advance!
    Regards,
    Sreelakshmi.

    What you describe is completely possible.  Since you have the image data (XSTRING) in the context you have everything you need.  You don't need to store the content into the MIME Repository, but you do need to get it somewhere where it has an externally accessible URL.  Remember you need to supply image UI element with a URL.  This URL is processed on the client side by the web browser.  Therefore just giving it a path to the context won't work as that isn't externally accessible.
    I would suggest instead that you place the image content into the ICM cache temporarily.  This lets you basically generate a temporary URL for the image that can be used by the Image UI element. 
    Here is some example code that pushes images into the ICM Cache:
    ****Create the cached response object that we will insert our content into
      DATA: cached_response TYPE REF TO if_http_response.
      CREATE OBJECT cached_response
        TYPE
          cl_http_response
        EXPORTING
          add_c_msg        = 1.
       try. " ignore, if compression can not be switched on
          call method cached_response->set_compression
            exporting
              options = cached_response->co_compress_based_on_mime_type
            exceptions
              others  = 1.
        catch cx_root.
      endtry.
    ****set the data and the headers
      DATA: l_app_type TYPE string.
      DATA: l_xstring TYPE xstring.
          cached_response->set_data( me->gx_content ).
          l_app_type = me->gx_mimetype
      cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = l_app_type ).
    ****Set the Response Status
      cached_response->set_status( code = 200 reason = 'OK' ).
    ****Set the Cache Timeout - 60 seconds - we only need this in the cache
    ****long enough to build the page and allow the Image on the Client to request it.
      cached_response->server_cache_expire_rel( expires_rel = I_CACHE_TIMEOUT ).
    ****Create a unique URL for the object
      DATA: guid TYPE guid_32.
      CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = guid.
      CONCATENATE i_path '/' guid '.' i_format INTO r_url.
    ****Cache the URL
      cl_http_server=>server_cache_upload( url      = r_url
                                           response = cached_response ).

  • Display image from database with jspSmart

    Hi
    I have successfully uploaded and saved images into oracle(8.1.5) table DATA_TYPE(dtid number, iconname varchar2(30), icon blob). When I try to display a specific icon in my browser, I get "javax.servlet.ServletException: General error" at:
    PreparedStatement pstmt = myConnection.prepareStatement(mySQL);
    My code looks like this:
    imgModifyDataType.jsp
    <%
    ResultSet myResultSet = null;
    Statement myStatement = null;
    Connection myConnection = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    myConnection = DriverManager.getConnection("Jdbc:Odbc:Te","te","te");
    String iconName;
    String pDTID = request.getParameter("dtid");
    String mySQL = "Select iconname, icon from data_types where dtid=?";
    PreparedStatement pstmt = myConnection.prepareStatement(mySQL);
    pstmt.setString(1,pDTID);
    myResultSet = pstmt.executeQuery();
    iconName = myResultSet.getString("iconname");
    myUpload.initialize(pageContext);
    myUpload.downloadField(myResultSet,"icon","application/x-msdownload", iconName);
    %>
    I call this JSP from another JSP like this:
    <img src="imgModifyDataType.jsp?dtid=<%=pDTID%>">
    If we cannt display image with the help of another jsp like this then please guide me how to modify the imgModifyDataType.jsp to a servlet because I have never worked in servlets.
    Please help
    Sajid

    I think that it may help you get image from database. I used two jsp page. First one is getphoto.jsp that makes as table based in sql statment and invoke the getimage.jsp this last returns images based on
    the getphoto.jsp PhotoId.
    /** getphoto.jsp source code */
    <%@page import="java.sql.*,oracle.jdbc.*"%>
    <html>
    <head>
    <title>
    jsp1
    </title>
    </head>
    <body bgcolor="#ffffff">
    <table width="781" border="2">
    <tr<<td>
    <td width="83" bgcolor="#C0C0C0"><b>PhotoId</b><td width="450" bgcolor="#C0C0C0"><b>Description</b></td><td width="228" bgcolor="#C0C0C0"><b>Photo Image</b></td>
    <%
    Connection conn = null;
    Statement stmt = null;
    ResultSet rset = null;
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:@itas:1521:oraITAS","yourDbUserId","yourDbPassword");
    stmt = conn.createStatement();
    rset = stmt.executeQuery("select photo_id,photo_description from photo");
    while (rset.next()) {
         %>
         <tr><td width="83"><%=rset.getObject("photo_id")%></td><td width="450"><%=rset.getObject("photo_description")%></td><td width="228"><img src="getimage.jsp?PhotoId=<%=rset.getObject("photo_id")%>" width="238" height="228"></td></tr>
         <%
    conn.close();
    %>
    </table>
    </body>
    </html>
    /** getimage.jsp source code */
    <%@ page contentType="image/jpeg; chaoResult=iso-8859-1" language="java" import="java.sql.*,java.io.*,java.util.*" errorPage="" %>
    <%
    String strConnString = null;
    Connection oDbConn;
    Statement oStmt;
    ResultSet oResult;
    String strConnection = null;
    String strUserId = "c_erober";
    String strUserPwd = "sybdev99";
    String strDatabase = "oraITAS";
    String strPhotoId;
    strConnString = "jdbc:odbc:" + strDatabase;
    String strSql;
    try {
    strPhotoId = (String) request.getParameter("PhotoId");
    strSql = "select photo_image from photo" + ( (strPhotoId==null) ? " where photo_id = '001'": (" where photo_id = '" + strPhotoId + "'") );
    DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
    oDbConn = DriverManager.getConnection(strConnString,strUserId,strUserPwd);
    response.setContentType("image/jpeg");
    oStmt = oDbConn.createStatement();
    oResult = oStmt.executeQuery(strSql);
    oResult.next();
    byte[] bytearray = new byte[4096];
    int size=0;
    InputStream sImage;
    sImage = oResult.getBinaryStream(1);
    response.reset();
    response.setContentType("image/jpeg");
    response.addHeader("Content-Disposition","filename=getimage.jpeg");
    while((size=sImage.read(bytearray))!= -1 ) {
    response.getOutputStream().write(bytearray,0,size);
    response.flushBuffer();
    sImage.close();
    oDbConn.close();
    } catch (SQLException ex) { ex.getMessage();
    %>

  • Display images from a SQL database

    I want to display images from a SQL database. The images are in a table under a specific column and are stored as a link to the image. How would I display the images from the column in LabVIEW?
    I'm using LabVIEW 2013 version 13 and SQL Server 2012
    Paul Power
    I have not lost my mind, it's backed up on a disk somewhere

    Hi PauldePaor,
    I hope you are well.
    Once you have pulled the data from the database into LabVIEW in a string form (or path), you can simply use the Read BMP File (Or jpg, png depending on the file type) VI.
    More information can be found here:
    http://digital.ni.com/public.nsf/allkb/02971A30F5D8FC6986256A0A004F11A0
    Kind Regards,
    Aidan H
    Applications Engineer
    National Instruments UK & Ireland

  • How to display image from wamp if the data type i use is blob?

    please help me with the problem of displaying image from wamp if data type is blob. Thanks

    Don't store the images in the database. Store the image file names in the database and put the images in a folder.

  • I moved from an old macbook to a new one.  I copied all my files onto a hard drive.  On trying to setup my mail, i went into documents, microsoft user identities, office 2011 and it shows the database but wont let me select it.  Urgent help pls

    I moved from an old macbook to a new one.  I have installed Office for Mac 2011. I copied all my files from my old notebook onto a hard drive.  On trying to setup my mail, i went into my hard drive and accessed microsoft user identities, office 2011 and it shows the database but wont let me select it.  Its almost as if the file is there but not accessable.  I desperately need to access my old mail.  How do I do this?  I am fairly confident that I copied all files off my old notebook.  Is there a way for me to search for the Database file?  Maybe I copied it to a different location?  Urgent help please.

    Hello mafrerichs and welcome to Apple Support Communities,
    Simplest way is to use Target Disk mode:
    How to use and troubleshoot FireWire target disk mode - Apple Support
    and hook to another Mac and use CCC or SuperDuper and clone your HD to another drive.
    You could also pull the drive out of your MBP and use an external USB case or SATA - USB dongle to hook it to another Mac.
    "MacBook Pro (15-inch Late 2011),... have a 15" 2012 Macbook pro with 2gb of ram, i7 processor"
    That's a little confusing?

  • Problem Displaying image from blob

    Hi all,
    I m using,
    Database : 10g Rel 2
    Frontend : DevSuite 10g
    OS : WinXp
    Browser : IE 6
    Problem : In my forms i m displaying images from blob column but some of the images are not displayed. I have tried with all image formats available in combination with all available display quality but no luck. What could be the reason for it and how do i solve it?
    Can anyone help me plz?
    Thnx in advance.
    Imtiaz

    Hello,
    It is very difficult for us to "guess" what images you can read and what others you cannot.
    Maybe you could provide more information on images that are not displayed ?
    What is their native format ?
    Francois

  • Displaying images from url's (9i)

    Is it possible to some how display images retrieved from a url within an image item? I know its possible to display images from within the database and from a file but these images are stored on another server and all i have is a web address, can it be done? Also is it possible to dislpay a series of images that are retrieved in this way in a report?
    Any help is much appreciated.

    Hi,
    this would require a Java Bean to be written. Its not natively possible in Forms
    Frank

  • Displaying Images in the E-Commerce B2B Application

    Hi All,
        I have added some thumbnails to Products and i replicated the product catalog with all require settings like publishing id, but still the image is not displaying. I have added bitmap image.
       Please let me know How exactly we have to upload the images in to product and what will be the require settings to display the images in the CRM ISA Application.
    Thanks in Advance...

    If you have an image/thumb attached to the Product it will display on the catalog, but not the other way around.  I would love to have a way to mass upload images to the product, but have not seen a way yet...so, for our purposes, it's easier to upload to the catalog.
    In 4.0sr1, there are two check boxes for delta replication of the catalog.  We only check the Transfer Document Content, not Publish Docs via HTTP
    I usually just hit F1 on the field to see what Help is built into the system.  Both of these have good documentation.
    Go to SE38 and review the program COM_PCAT_MASS_DOC_IMPORT
    Here's the Help for that program in CRM4.0sr1:
    Short text
    Mass import of documents for product catalog items
    Title
    Mass Import of Multimedia Documents for Product Catalogs
    Purpose
    This report enables you to automatically import multimedia documents that are already available in a file system and assign these documents to product catalog items. The items are identified using a product number. An item is created if a corresponding one is not available.
    A simple text file, which can be created using the normal spreadsheet programs or simple text editors, is used as a basis for the import. This text file should be made up as follows:
    The first line is ignored, its content is insignificant and can, for example, contain the headings of the columns. The remaining lines correspond to the document that is to be imported and contain 3 to 4 columns with:
    1. The product number of the catalog item that the document is to be added to
    2. The number of the catalog area in which the item is located or in which it is to be created if it has not yet been created
    3. The complete file name, including the path of the document that is to imported and assigned. Make sure that the import takes place on the frontend, that is the frontend must be able to read the file from a specified path
    4. The document type of the document. This specification is optional, make sure that the document type for the catalog is valid for your application (that is to say that a corresponding folder for templates, for items of the catalog type is available)
    Two formats are supported for dividing columns: "Tab-delimited", that is the columns are separated using tabulator characters or "comma separated", that is the columns are separated using semi colons (or another character that is not used in the column contents).
    Selection
    Required parameters are the product catalog and the name of the text file that contains information about the documents that are to be imported.
    You can determine that all documents are to be considered as language-independent, with the "language-independent documents" parameter. You can specify a language in the field "document type" if the indicator is not set.
    The "file format" parameter enables you to inform the system which format the text file has. You can use another separators in addition to the semi colon that is suggested as a default for: "comma separated values"
    If you set the "Delete catalog contents" parameter, all of the catalog items are deleted before the import.
    If you set the "Subsequently activate items" parameter, all of the items are activated after the import.
    Example
    Example for constructing a "comma separated values" file:
    Product number;Catalog area;File;Document type
    100001;AREA1;C:\My Documents\Images\100001_small.gif;CRM_THUMB
    100001;AREA1;C.\My Documents\Images\100001_large.jpg;CRM_IMAGE
    100002;AREA1;C:\My Documents\Images\100002_small.gif;CRM_THUMB

  • Display image from table!

    Hi,
    I have in my aplication a table user, where we can save is image:
    t_user{id_user, name , adress..., foto(blob),foto_size(number),foto_name,foto_mime_type};
    An user can upload his imageand save it in his table!
    I wanted to display his image, but i onle found infomation how to show images saved in htmldb_application_files:
    how to display image from tables?
    Thank's in advance

    Look at the sample application. It shows you how to do this

  • My 8530 does not display images in the browser

    My bb 8530 a few weeks ago suddenly stopped displaying images in the browser. Browser options are set to "display images". I've power cycled many times, even reset and wiped, but still no images in browser. How can I fix this? Thanks.

    hi i have noticed the same problem. also with Chrome and FP ver 11.5.31.2and Firefox and Safari with FP 11.5.502.110
    it seems that MovieClipLoader class not returning onLoadInit event. I use to add a fadein function on loadInit to fade in the loaded images. with the latest Flash PLayer versions this is not activated so you cannot see the loaded images.
    I have tested this on 3 different systems and the problem is the same. I have not updated my FP for IE. There, the older FP still works well.
    test systems
    Mac OS LionSafari and FP 11.5.502.110 --- DOES NOT WORK WELL
    Windows 7 64 bit
    chrome 23.0.1271.95 with FP 11.5.31.2  - DOES NOT WORK WELL
    Firefox 16.02 with FP 11.5.502.110  - DOES NOT WORK WELL
    IE 9 with FP version 11.4.402.287  - WORKS
    Windows XP SP3
    Firefox 16.02 with FP 11.5.502.110 - DOES NOT WORK WELL
    IE 8 wth FP 11.4.402.287  - WORKS
    chrome 23.0.1271.95 with FP 11.5.31.2  - DOES NOT WORK WELL

  • Is it better to store the image in the database or to use BFile

    Hi all,
    I've a doubt regarding the handling of the image. For example i've the images of the persons amounting to 50,000(the number will be increased in future). So i just want to know which is the better menthod. is it better to store all the images in the database or to store in local OS and use Bfile concept. I'm using Forms 6i and Forms 10g(10.1.2.0.2). OS: Windows XP
    Regards,
    Alok Dubey
    Edited by: Alok Dubey on Nov 14, 2008 5:43 PM

    But the total number (i.e.., 50,000) is scaring me to use the BlobI don't think the database will cause problem just due to the amount of data stored in blobs. Of coure you would have to check which parameters to set for the blobs to make storage efficient. If
    You didn't mention your db-version, in 11G you could also think of using compression and deduplication to deal with the data amount.
    In general i agree with Francois, the best way depends, but in terms of data consistency and easy backup/restore there might be some advantages in using the blob-version.
    hope this helps.

Maybe you are looking for