web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

What is the best way to store images in NAV

(0) ShareShare
ReportReport
Posted on by

In item master we can insert one image, but I want to add another 5 images to this (all together 6 item images). What is the best method of storing a image.

1. Keeping it in a blob field.

2. Saving to a folder and keep a link. 

What is the best way of doing it? Are there any other methods available?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    keoma Profile Picture
    32,729 on at

    hi

    standard nav way (and also the simpler way) is storing them in blob fields.

    your second idea will maybe also work: storing the images in a folder on the server. for usage it would be necessary to download them from server to client at runtime.

    msdn.microsoft.com/.../dd301099.aspx

    for reports: it's also possible the embed images in the report.

  • Community Member Profile Picture
    on at

    Storing images in DB is easy. Will it affect the DB size ? Because they have around 12000 items and 6 images for each item. All together 72000 images and still growing.

    My worry is about database size and will it slow down NAV ?

  • Verified answer
    keoma Profile Picture
    32,729 on at

    hi

    yes, that could be a performance problem. storing the images in the sql server is not a problem, sql server are strong enough. problem is reading the images at runtime. always, when a record is loaded in nav, the image in the blob field is also loaded. so the useability of pages and reports slow down.

    for a solution follow:

    dynamicsuser.net/.../blob-fields-with-nav-amp-sql.aspx

  • Verified answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    Best way is to store your images in a NAV database.

    It is safe and very easy to retrieve from the DB as Jonathan said.

    About the DB size, yes it will be a problem with the DB size but SQL can easily handle this, if you properly manage the design. However you will definitely face performance issue with the time.

    As a example if you save all these images in item table then at the time of you search in the item table, system will get slow.

    Instead of doing that save all these images in a separate table and have a link to a item table.

    By doing that you will be able to minimize the performance issue.  

  • Verified answer
    4BzSoftware Profile Picture
    6,073 on at

    Hi Dushan,

    My vote for saving images in blob fields. By doing this:

    - Use NAV standard way to handle images, including read, write, report, transfer fields, ... (Jonathan mentioned).

    - No need to manage and backup file server.

    - Links between NAV data and file names are sometimes become dummy.

    - Reading performance in NAV is not an issue unless blob fields are retrieving by CALCFIELDS (Tharanga mentioned).

    - For storage, there are some techniques of SQL you can use such as shrink database, files, backup with compression ... for your database management.

  • Verified answer
    Manish Sinha Profile Picture
    22 on at

    Hi Dushan,

    My suggestion could be:

    1. Create a new table and keep the image file in BLOB

    2. You can use the concept of "Implementation of surrogate keys using AutoIncrement pattern" for new table.

    3. [Optional] You can save this new table in separate data file i.e. concept of multiple NDF file.

    Thanks,

    Manish

  • Verified answer
    Saurabh Shah Profile Picture
    4,560 on at

    Hi,

    I agree and recommend blob field and store the image in database which more secure and easily accessible.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans