Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

What is the best way to store images in NAV

Posted on by Microsoft Employee

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

  • Verified answer
    Saurabh Shah Profile Picture
    Saurabh Shah 4,560 on at
    RE: What is the best way to store images in NAV

    Hi,

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

  • Verified answer
    Manish Sinha Profile Picture
    Manish Sinha 18 on at
    RE: What is the best way to store images in NAV

    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
    4BzSoftware Profile Picture
    4BzSoftware 6,071 on at
    RE: What is the best way to store images in NAV

    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
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: What is the best way to store images in NAV

    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
    keoma Profile Picture
    keoma 32,675 on at
    RE: What is the best way to store images in NAV

    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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: What is the best way to store images in NAV

    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
    keoma 32,675 on at
    RE: What is the best way to store images in NAV

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans