[[svg-support]]
= SVG Support

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


(As per link:https://issues.apache.org/jira/browse/CAUSEWAY-1604[CAUSEWAY-1604]), SVG images can be used:

* as Logo in the upper left corner (Wicket Menubar)
* on the Login Page (`login.html`)
* as favicon (`image/svg+xml`, cf. link:https://issues.apache.org/jira/browse/CAUSEWAY-1115[CAUSEWAY-1115])

However, SVGs are not, by default, displayed on the welcome page.
SVGs can be attached as ``Blob``s, but they are displayed as bitmaps (by means of the Batik rasterizer) and do not scale.
The rasterizer (of course) can not deal with animations (cf. attachment).

To fix this, you can add the following dependencies:

[source,xml]
----
<dependency>
    <groupId>com.twelvemonkeys.imageio</groupId>
    <artifactId>imageio-batik</artifactId> <!-- svg -->
    <version>3.3.2</version>
</dependency>
<dependency>
    <groupId>com.twelvemonkeys.imageio</groupId>
    <artifactId>imageio-batik</artifactId> <!-- svg -->
    <version>3.3.2</version>
    <type>test-jar</type>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-transcoder</artifactId>
    <version>1.8</version>
</dependency>
----

However, *please note* that these dependencies have high CVE values, and so may constitute a security risk.

Further discussion on link:https://lists.apache.org/thread.html/68f16dd0306a8101c1cde06e5e6309b8d1b81b388a1f59e123cfc2f3@%3Cusers.causeway.apache.org%3E[this mailing list thread].

