留言板

LR 7: image and thumbnail not shown for SVG files

thumbnail
Mirto Silvio Busico,修改在7 年前。

LR 7: image and thumbnail not shown for SVG files

Regular Member 帖子: 240 加入日期: 12-1-18 最近的帖子
I have some images uploaded in Documents and Media.
For jpg images I can see the image and the preview in Document and media and in an asset publisher.

For svg files (after I enabled the image type) I can do the upload but no image and no thumbnail are showed in document and media and in asset publisher.

Thumbnails are correctly created and if I use the function "Reset preview and thumbnail files for Documents and Media portlet." in Server administration, the thumbnail are cleared and recreated. So I think imagemagick is correctly configured.

What have I to do to have LR manage svg files?
Thomas Hirsch,修改在7 年前。

RE: LR 7: image and thumbnail not shown for SVG files

New Member 帖子: 2 加入日期: 10-4-25 最近的帖子
I would like to know as well. Currently I am on 7.0GA3 and SVG Files will not work/show up as with the other formats.
Did you ever got a response or found a solution to this?
If so - please report back here.
thumbnail
Mirto Silvio Busico,修改在7 年前。

RE: LR 7: image and thumbnail not shown for SVG files

Regular Member 帖子: 240 加入日期: 12-1-18 最近的帖子
Sorry. Still I didn't find a solution nor received a reply.
If I'll have news I'll post here
Renzo Filini,修改在6 年前。

RE: LR 7: image and thumbnail not shown for SVG files

New Member 发布: 1 加入日期: 15-11-18 最近的帖子
I don't know if it is useful for you, I modified Liferay 5.1.1 source code to support SVG. The version is not the same you are using, but it should be useful to take as example. The concept is that with svg the thumbnail (useless) is created as dummy image and in the view part the thumbnail is replaced with the image itself but with the thumbnail width and height.
Then the correct content-type must be image/svg+xml.
Attached the files for Liferay 5.1.1. The ROOT folder (for Liferay 5.1.1) must be copied in tomcat webapps folder. The zip includes source files and class files.

I will adapt that to Liferay 7.
thumbnail
Mirto Silvio Busico,修改在6 年前。

RE: LR 7: image and thumbnail not shown for SVG files

Regular Member 帖子: 240 加入日期: 12-1-18 最近的帖子
Thanks I'll give it a try asap.
Christoph Rabel,修改在7 年前。

RE: LR 7: image and thumbnail not shown for SVG files

New Member 帖子: 6 加入日期: 13-1-15 最近的帖子
Well, it probably would be best if Liferay would just show the svg files and not do anything with svg. It actually makes no sense to create a thumbnail of an svg.

As a workaround, maybe you could add the TwelveMonkeys lib to Liferay:
https://github.com/haraldk/TwelveMonkeys

Liferay uses ImageIO to read and scale of images. It doesn't matter at all if you have configured ImageMagick or not. It simply isn't used by Liferay to create thumbnails or scale images. It can only handle image formats ImageIO supports. I guess, it comes down to this list:
https://docs.oracle.com/javase/7/docs/api/javax/imageio/package-summary.html

But TwelveMonkeys extends this functionality and maybe thumbnail creation works after installing this lib?