Use smaller gifs to improve load time

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2016-10-27 18:06:16 -07:00
parent 9170020141
commit 16f277761e

View File

@ -9,15 +9,15 @@ public class GiphyImage {
private ImageTypes images; private ImageTypes images;
public String getGifUrl() { public String getGifUrl() {
return images.downsized_medium.url; return images.downsized.url;
} }
public float getGifAspectRatio() { public float getGifAspectRatio() {
return (float)images.downsized_medium.width / (float)images.downsized_medium.height; return (float)images.downsized.width / (float)images.downsized.height;
} }
public String getStillUrl() { public String getStillUrl() {
return images.fixed_width_still.url; return images.downsized_still.url;
} }
public static class ImageTypes { public static class ImageTypes {
@ -37,6 +37,10 @@ public class GiphyImage {
private ImageData fixed_width_small; private ImageData fixed_width_small;
@JsonProperty @JsonProperty
private ImageData downsized_medium; private ImageData downsized_medium;
@JsonProperty
private ImageData downsized;
@JsonProperty
private ImageData downsized_still;
} }
public static class ImageData { public static class ImageData {