Bug report #9790

No images in HTML labels in composer

Added by Alexander Bruy over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:wontfix
Crashes QGIS or corrupts data:No Copied to github as #:18331

Description

Composer label with "Render as HTML" enabled don't display images in composition. Image appears only after exporting composition. To reproduce:
  1. create new composer
  2. add new label
  3. enable "Render as HTML" and enter text
    <img src="http://gis-forum.org.ua/wp-content/uploads/2014/01/copy-GIS-Forum-2014-Logo-Mini.png">
  4. label rendered as empty rectangle
  5. export composition in any format
  6. now label displayed correctly

Tested on 2.0.1, 2.2 and master

History

#1 Updated by Jürgen Fischer over 10 years ago

  • Category changed from 33 to Map Composer/Printing

#2 Updated by Nyall Dawson over 10 years ago

  • Resolution set to wontfix
  • Status changed from Open to Closed

This is a deliberate design decision. Since the composer labels are automatically updated as the label content changes the label will attempt to render invalid/partial html while the user is entering the label html content. Generally this is ok, but for images qt segfaults and crashes qgis if an attempt is made to render an invalid image url. Consequently composer labels are coded to only render html images when exporting a composition.

Also available in: Atom PDF