##// END OF EJS Templates
don't assume outputs have metadata...
MinRK -
Show More
@@ -120,10 +120,10 b' unknown type {{ cell.type }}'
120 120
121 121 {% block data_png %}
122 122 <img src="data:image/png;base64,{{ output.png }}"
123 {%- if 'width' in output.metadata.get('png', {}) %}
123 {%- if 'metadata' in output and 'width' in output.metadata.get('png', {}) %}
124 124 width={{output.metadata['png']['width']}}
125 125 {%- endif %}
126 {%- if 'height' in output.metadata.get('png', {}) %}
126 {%- if 'metadata' in output and 'height' in output.metadata.get('png', {}) %}
127 127 height={{output.metadata['png']['height']}}
128 128 {%- endif %}
129 129 >
@@ -131,10 +131,10 b" height={{output.metadata['png']['height']}}"
131 131
132 132 {% block data_jpg %}
133 133 <img src="data:image/jpeg;base64,{{ output.jpeg }}"
134 {%- if 'width' in output.metadata.get('jpeg', {}) %}
134 {%- if 'metadata' in output and 'width' in output.metadata.get('jpeg', {}) %}
135 135 width={{output.metadata['jpeg']['width']}}
136 136 {%- endif %}
137 {%- if 'height' in output.metadata.get('jpeg', {}) %}
137 {%- if 'metadata' in output and 'height' in output.metadata.get('jpeg', {}) %}
138 138 height={{output.metadata['jpeg']['height']}}
139 139 {%- endif %}
140 140 >
General Comments 0
You need to be logged in to leave comments. Login now