diff --git a/src/image.c b/src/image.c index f2079fab6a3..7019bbf31be 100644 --- a/src/image.c +++ b/src/image.c @@ -12834,8 +12834,10 @@ non-numeric, there is no explicit limit on the size of images. */); add_image_type (Qpng); #endif -#if defined (HAVE_WEBP) || (defined (HAVE_NATIVE_IMAGE_API) \ - && defined (HAVE_HAIKU)) +#if defined (HAVE_WEBP) \ + || (defined (HAVE_NATIVE_IMAGE_API) \ + && ((defined (HAVE_NS) && defined (NS_IMPL_COCOA)) \ + || defined (HAVE_HAIKU))) DEFSYM (Qwebp, "webp"); DEFSYM (Qwebpdemux, "webpdemux"); add_image_type (Qwebp); diff --git a/src/nsimage.m b/src/nsimage.m index af8eb629989..b33124900bb 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -77,6 +77,10 @@ ns_can_use_native_image_api (Lisp_Object type) #ifndef HAVE_RSVG else if (EQ (type, Qsvg)) imageType = @"public.svg-image"; +#endif +#ifndef HAVE_WEBP + else if (EQ (type, Qwebp)) + imageType = @"org.webmproject.webp"; #endif else if (EQ (type, Qheic)) imageType = @"public.heic";