Rad Image Gallery thumbnail broken

1 Answer 12 Views
ImageGallery
Patrick
Top achievements
Rank 1
Patrick asked on 02 Apr 2025, 03:38 AM | edited on 02 Apr 2025, 04:10 AM

I use telerik web ui  2024.1.131.45 in my asp net web app. Using Rad Image Gallery the thumbnail is not showing (see attached). Any idea why?

Thanks before

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Apr 2025, 08:51 AM

Hi Patrick,

To address the issue of thumbnails not showing in your RadImageGallery, please consider the following troubleshooting steps and suggestions:

  • Check the Image Paths:

    • Verify that the DataThumbnailField and DataImageField properties are correctly set to the fields containing the paths to your images. Incorrect paths can prevent the gallery from displaying the thumbnails.
  • Verify Image Paths Accessibility:

    • Ensure that the paths to the images are accessible from the server. If you are using virtual paths, confirm that they are correctly configured.
  • Data Binding:

    • Use the OnNeedDataSource event to bind your data source instead of calling DataBind() directly. This event helps in setting up the data correctly for the gallery. Here's a sample setup:

      <telerik:RadImageGallery ID="PhotoGallery" runat="server" DataImageField="FilePath" DataThumbnailField="ThumbnailPath" OnNeedDataSource="PhotoGallery_NeedDataSource">
      </telerik:RadImageGallery>
      
      

      protected void RadImageGallery1_NeedDataSource(object sender, Telerik.Web.UI.ImageGalleryNeedDataSourceEventArgs e)
      {
      	(sender as RadImageGallery).DataSource = GetImageGalleryData();
      }
      
      
      private DataTable GetImageGalleryData()
      {
      	DataTable table = new DataTable();
      	table.Columns.Add("Title", typeof(string));
      	table.Columns.Add("Description", typeof(string));
      	table.Columns.Add("ImageData", typeof(string));
      	table.Columns.Add("ThumbnailData", typeof(string));
      
      
      	table.Rows.Add("Image 1", "Description", "image1.png", "image1_thumb.png");
      	table.Rows.Add("Image 2", "Description", "image2.png", "image2_thumb.png");
      	table.Rows.Add("Image 3", "Description", "image3.png", "image3_thumb.png");
      
      
      	return table;
      }

  • Image Gallery Configuration:

    • Double-check the configuration of your RadImageGallery to ensure all necessary properties are set correctly, such as DataImageField, DataThumbnailField, and ImagesFolderPath.
  • Check for Errors:

    • Inspect the browser's console and network tab for any errors or failed requests related to loading the images.
    • Pay special attention to 404 errors or blocked resources that could indicate a path issue.
  • Review Server Logs:

    • Check server logs for any errors related to accessing the image files or handler exceptions.

    • Verify File System Permissions:

      • Ensure the application pool identity or user under which your ASP.NET app is running has read access to the folders containing the images.
    • Check for Version Regression:

      • If this was working in a previous version, please let us know the version number. It will help determine whether this is a regression in 2024.1.131.45.
      • Note: In the official Telerik demo (link), the thumbnails load correctly using a similar configuration.

    Additionally, could you provide more details about your setup? Specifically:

    • Whether the issue occurs both locally and in production?
    • Are all images affected or only some?
    • Is there any custom image loading logic or are you relying on folder binding?

    This information will help in diagnosing the problem further and offering a more tailored solution.

    Regards,
    Rumen
    Progress Telerik

    Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

    Patrick
    Top achievements
    Rank 1
    commented on 03 Apr 2025, 07:31 AM

    I found the issue, I forgot to set the ImagesFolderPath

    Thank you for your help

    Patrick

    Rumen
    Telerik team
    commented on 03 Apr 2025, 07:36 AM

    I am glad that the problem is resolved, Patrick! Keep up the good work!

    Tags
    ImageGallery
    Asked by
    Patrick
    Top achievements
    Rank 1
    Answers by
    Rumen
    Telerik team
    Share this question
    or