Skip to content

Commit 10fac99

Browse files
authored
Add support for avif format. (#300)
Add support for parsing rich text from JSON.
1 parent 184e5c7 commit 10fac99

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/main/java/com/contentful/java/cda/image/ImageOption.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ public enum Format {
3434
/**
3535
* Use googles lossy and lossless format.
3636
*/
37-
webp;
37+
webp,
38+
39+
/**
40+
* Use the AVIF format, which is efficient for compression and quality.
41+
*/
42+
avif;
3843

3944
final String override;
4045

src/main/java/com/contentful/java/cda/rich/RichTextFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static List<CDARichMark> resolveMarks(List<Map<String, Object>> rawMarks) {
143143
* @param rawNode the map response from Contentful
144144
* @return a CDARichNode from this SDK.
145145
*/
146-
static CDARichNode resolveRichNode(Map<String, Object> rawNode) {
146+
public static CDARichNode resolveRichNode(Map<String, Object> rawNode) {
147147
final String type = (String) rawNode.get("nodeType");
148148
if (RESOLVER_MAP.containsKey(type)) {
149149
return RESOLVER_MAP.get(type).resolve(rawNode);

0 commit comments

Comments
 (0)