mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-22 05:42:33 +03:00
try non webp
This commit is contained in:
parent
6a81ac0c0d
commit
e1a6dc8435
@ -5,7 +5,7 @@ import { proxifyImageSrc } from '@ecency/render-helper';
|
||||
import { Platform } from 'react-native';
|
||||
|
||||
const whatOs = Platform.OS;
|
||||
const BASE_IMAGE_URL = whatOs === 'android' ? 'https://images.ecency.com/webp' : 'https://images.ecency.com';
|
||||
const BASE_IMAGE_URL = 'https://images.ecency.com';//whatOs === 'android' ? 'https://images.ecency.com/webp' : 'https://images.ecency.com';
|
||||
|
||||
export const generateSignature = (media, privateKey) => {
|
||||
const STRING = 'ImageSigningChallenge';
|
||||
@ -26,7 +26,7 @@ export const generateSignature = (media, privateKey) => {
|
||||
export const catchEntryImage = (entry, width = 0, height = 0, format = 'match') => {
|
||||
// return from json metadata if exists
|
||||
let meta;
|
||||
format = whatOs === 'android' ? 'webp' : 'match';
|
||||
format = 'match';//whatOs === 'android' ? 'webp' : 'match';
|
||||
|
||||
try {
|
||||
meta = JSON.parse(entry.json_metadata);
|
||||
@ -66,7 +66,7 @@ export const catchEntryImage = (entry, width = 0, height = 0, format = 'match')
|
||||
|
||||
export const catchDraftImage = (body, format = 'match', thumbnail = false) => {
|
||||
const imgRegex = /(https?:\/\/.*\.(?:png|jpg|jpeg|gif|heic|webp))/gim;
|
||||
format = whatOs === 'android' ? 'webp' : 'match';
|
||||
format = 'match';//whatOs === 'android' ? 'webp' : 'match';
|
||||
|
||||
if (body && imgRegex.test(body)) {
|
||||
const imageMatch = body.match(imgRegex);
|
||||
@ -80,7 +80,7 @@ export const catchDraftImage = (body, format = 'match', thumbnail = false) => {
|
||||
|
||||
export const getResizedImage = (url, size = 600, format = 'match') => {
|
||||
//TODO: implement fallback onError, for imagehoster is down case
|
||||
format = whatOs === 'android' ? 'webp' : 'match';
|
||||
format = 'match'; //whatOs === 'android' ? 'webp' : 'match';
|
||||
if (!url) {
|
||||
return '';
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import parseAsset from './parseAsset';
|
||||
import { getResizedAvatar } from './image';
|
||||
import { parseReputation } from './user';
|
||||
|
||||
const webp = Platform.OS === 'ios' ? false : true;
|
||||
const webp = Platform.OS === 'ios' ? false : false;
|
||||
|
||||
export const parsePosts = (posts, currentUserName) => {
|
||||
if (posts) {
|
||||
|
Loading…
Reference in New Issue
Block a user