Jump to content

HEIC iPhone image embeds


abetts
 Share

Recommended Posts

5 hours ago, Joy Rex said:

I would think you'd need some sort of javascript-powered polyfill to make this work...

And, lo and behold, there is: https://github.com/nokiatech/heif

It's a lot easier than that - just need to add heic as an additional image type in the $imageExtensions that are listed in \IPS\Image. Plugin sent to the OP - going to see if I can refine it a bit though.

Link to comment
Share on other sites

12 minutes ago, Nathan Explosion said:

 just need to add heic as an additional image type in the $imageExtensions that are listed in \IPS\Image. 

What does that achieve? Telling the IPS software it’s an image format doesn’t change the missing browser support. Or do you change what is uploaded? I don’t get it. 

Link to comment
Share on other sites

16 minutes ago, opentype said:

What does that achieve? Telling the IPS software it’s an image format doesn’t change the missing browser support. Or do you change what is uploaded? I don’t get it. 

If the browser supports it, it will display - support for the format is gradually coming in, and I think the link you posted earlier isn't correctly indicative of the current support state.

Example - using Firefox Quantum 57.0.4

without plugin:

image.thumb.png.7507f69e291b995cadd93ea3f79130f7.png

With plugin:

image.thumb.png.ace36ec38fb45f628849da27047af060.png

It's not ideal though - got a few ideas on improving the behaviour for browsers that don't support it but will take a look at a later point.

 

Edited by Nathan Explosion
Link to comment
Share on other sites

On 1/29/2018 at 10:34 AM, abetts said:

iPhones are fairly popular so I'd hope Invision would include this format at some point soon. 

Yes, but I don't think Safari Mobile (on iOS) supports the image format yet - nope: https://caniuse.com/#feat=heif

23 hours ago, Nathan Explosion said:

It's a lot easier than that - just need to add heic as an additional image type in the $imageExtensions that are listed in \IPS\Image. Plugin sent to the OP - going to see if I can refine it a bit though.

Plugin? an IPS plugin, or browser plugin?

Link to comment
Share on other sites

Frankly, the best option at this point would be to advice your iPhone users not to upload this format. It’s just not meant to be used this way. All apps on iOS convert it to a standard format like JPG while sharing. Not sure how this can be done in a browser upload form. I guess the image libraries (GD/ImageMagick) would need to support it first for a conversion, but that will also take years to reach a broad support. 

Link to comment
Share on other sites

  • 7 months later...

If you upload the image from your phone, IOS converts this to a usable format, this user must be manually transferring the images from his phone to a PC/Mac then trying to upload them? Please check with him and see.  I can't duplicate any issues directly uploading from the phone though. 

Link to comment
Share on other sites

  • 2 weeks later...

I've never seen this behavior in real world usage.

It's also important to note that the backend is restricted by the image formats supported by the image library, and since most users use GD (which doesn't support HEIF) then you can't just throw the extension into the image formats array and expect everything else to work fine. I believe ImageMagick does support HEIF (at least newer versions).

The easiest solution for now might be to just tell your users to use regular jpgs.

https://petapixel.com/2017/09/25/make-iphone-shoot-jpegs-ios-11/

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...