Bug report #20442
QGIS 3.4.1 map tips with images does not work
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Map Canvas | ||
Affected QGIS version: | 3.4.1 | Regression?: | No |
Operating System: | win 10 - osgeo4w nightly | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | invalid |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28262 |
Description
I used this html code:
<img src="[% @project_folder || '/' || "filename" %]" width = "200">
in QGIS 2.18 it works, in QGIS 3.4.1 it does not work
projects and data:
https://mega.nz/#!tIxG2CoT!W5xz_2VMSF5Y7DWiVLoRXZh5Q4GFdMGn6kluwcTVAzw
History
#1 Updated by Jan Lippmann about 6 years ago
in my project it works with 3.4.1
html:
<img width="250px" src="[% "foto_url" %]" />
foto_url is a virtual field with for instance following content "file:///C:/fotos/folder.jpg"
#2 Updated by salvatore fiandaca about 6 years ago
- File niente.png added
Jan Lippmann wrote:
in my project it works with 3.4.1
html:
<img width="250px" src="[% "foto_url" %]" />
foto_url is a virtual field with for instance following content "file:///C:/fotos/folder.jpg"
I tried but it still does not work.
I also changed the \ con / but nothing, it does not work.
#3 Updated by Jan Lippmann about 6 years ago
try this:
<img src="[% 'file:///' || @project_folder || '/' || "filename" %]" width = "200">
it works with your project... i have tested
#4 Updated by salvatore fiandaca about 6 years ago
- File wow.png added
Jan Lippmann wrote:
try this:
<img src="[% 'file:///' || @project_folder || '/' || "filename" %]" width = "200">
it works with your project... i have tested
so you need to write 'file: ///' ||
I think it's a bug !!!
thank you!!!
this works:
<img src = "[% 'file: ///' ||" path "%]" width = "200">
<img src = "[% 'file: ///' || @project_folder || '/' ||" filename "%]" width = "200">
#6 Updated by Giovanni Manghi about 6 years ago
- Status changed from Open to Closed
- Resolution set to invalid
#7 Updated by salvatore fiandaca about 6 years ago
IMHO is not a bug but it is a regression
adding 'file: ///' involves waste of time
#8 Updated by Giovanni Manghi about 6 years ago
salvatore fiandaca wrote:
IMHO is not a bug but it is a regression
adding 'file: ///' involves waste of time
is a standard, https://en.wikipedia.org/wiki/File_URI_scheme