diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 2cc2f4eb7b..d375da434f 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -508,10 +508,12 @@ class CustomImagesTable(ToasterTable):
recipe_file_template = '''
{{data.name}}_{{data.version}}.bb
+ {% if data.get_base_recipe_file %}
- '''
+
+ {% endif %}'''
self.add_column(title="Recipe file",
static_data_name='recipe_file_download',
diff --git a/bitbake/lib/toaster/toastergui/templates/customrecipe.html b/bitbake/lib/toaster/toastergui/templates/customrecipe.html
index ea3c9c7324..aeb4466a20 100644
--- a/bitbake/lib/toaster/toastergui/templates/customrecipe.html
+++ b/bitbake/lib/toaster/toastergui/templates/customrecipe.html
@@ -4,6 +4,7 @@
{% load static %}
{% block pagecontent %}
+{% with recipe.get_base_recipe_file as base_recipe_file %}