-1

After a great deal of struggling I determined that the titanium http client will, on certain image urls, return the image in a 'webp' format (RIFF). This format seems to work in imageviews, but it has all sorts of problems when uploaded to AWS. Further investigation suggests this is google chrome behavior, so I guess Titanium must ping google chrome for its web calls.

Is there a way to disable this that I'm not seeing? Or am I going to have to do some conversions on my backend (please no...)

**EDIT*

Okay, so it looks like webp is served because it detects that it is an android/chrome device in the user agent. In fact, I ascertained this with curl. However, changing the user agent to iphone in titanium via both Ti.userAgent and xhr.setResponseHeader("User-Agent", "blahblah") had no effect.

Also setting accept headers that decline webp changes nothing.

1 Answers1

1

For the time being, after reading the file in I check for the first bytes to contain the identifier 'RIFF' which is used as a container for webp. So I simply do not display these images for selection. Ideally I should be able to somehow tell the website to serve me raw jpegs like I can in curl, but at least this is one fix.