diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/UrlUtils.java b/WordPressUtils/src/main/java/org/wordpress/android/util/UrlUtils.java index 7ac4dbaf089d..c2529526a898 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/UrlUtils.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/UrlUtils.java @@ -10,7 +10,6 @@ import java.io.UnsupportedEncodingException; import java.net.IDN; import java.net.URI; -import java.net.URL; import java.net.URLDecoder; import java.net.URLEncoder; import java.nio.charset.Charset; @@ -214,4 +213,8 @@ public static boolean isImageUrl(String url) { return cleanedUrl.endsWith("jpg") || cleanedUrl.endsWith("jpeg") || cleanedUrl.endsWith("gif") || cleanedUrl.endsWith("png"); } + + public static String appendPreviewURLParameter(String url) { + return Uri.parse(url).buildUpon().appendQueryParameter("preview", "true").build().toString(); + } }