{"id":21166,"date":"2012-11-21T10:14:19","date_gmt":"2012-11-21T10:14:19","guid":{"rendered":"http:\/\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more"},"modified":"2025-08-03T14:16:57","modified_gmt":"2025-08-03T21:16:57","slug":"api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more","title":{"rendered":"API for Extracting Semantic Image Data &#8211; Colors, Faces, Exif Data, and More"},"content":{"rendered":"<div><\/div>\n<div>When images are involved, web developers have a large set of relevant tools at their disposal. You can display images in your web sites and mobile applications. You can transform and transform such images using image editing and transformation software or cloud-based solutions like <a href=\"https:\/\/cloudinary.com\/products\/programmable_media\" target=\"_blank\" rel=\"noopener\">Cloudinary<\/a>. But there are other types of data embedded in image files that can add unique semantic information to the images and are hardly ever used.<\/div>\n<div><\/div>\n<div>Consider what new designs can appear if your graphics designer could assume that only blue themed user uploaded photos will be featured on your homepage. What about featuring only photos that show your users&#8217; faces? How about photos taken with new DSLR model cameras rather than older pocket ones? Only photos taken in the GPS vicinity of your website visitor? We believe that such capabilities can offer a new, important tool for web design and development.<\/div>\n<div><\/div>\n<div>Unfortunately, such semantic data is usually locked safely within the images and rarely utilized by developers and designers. We hope that we can change that by introducing a new <a href=\"https:\/\/cloudinary.com\/image-api\">Cloudinary API<\/a> that allows you to easily <a title=\"What is Digital Asset Management and Why It Matters for Organizations\" href=\"https:\/\/cloudinary.com\/guides\/digital-asset-management\/what-is-digital-asset-management\" target=\"_blank\" rel=\"noopener\">extract rich information<\/a> regarding your website and mobile application&#8217;s photos. Using this information you can search, sort and classify your images in amazing new ways.<\/div>\n<div><\/div>\n<h3 id=\"colors\">Predominant Colors &amp; Color Histogram<\/h3>\n<div><a href=\"https:\/\/res.cloudinary.com\/cloudinary\/image\/upload\/f_auto,q_auto\/cmypxknoanbs9uox1krb.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" style=\"float: left; margin: 10px 15px 10px 15px;\" src=\"https:\/\/res.cloudinary.com\/cloudinary\/image\/upload\/cmypxknoanbs9uox1krb.png\" alt=\"\" width=\"183\" height=\"215\" \/><\/a>Image search services such as Google Image Search allow you to filter your image search to show only images of a certain color. How is it done? Each image is analyzed and the colors of the images are mapped to one or more leading colors.<\/div>\n<div><\/div>\n<div>Cloudinary now supports finding the leading colors of a given image using a standard palette of 12 main colors. Since Cloudinary is a cloud-based service, all image processing is done online and no software installation is required on your side.<\/div>\n<div><\/div>\n<div>Finding the <strong>predominant colors<\/strong> in an image is also useful for stock-photo sites that wants to allow you to narrow photo searching by colors (see our <a href=\"https:\/\/cloudinary.com\/blog\/how_to_quickly_build_a_stock_photo_site_using_cloudinary\" target=\"_blank\" rel=\"noopener\">previous post<\/a> of how-to quickly build a stock-photo site with Cloudinary) and for eCommerce sites. For example: if you have a fashion site, and you want your users to browse only blue or red shirts.<\/div>\n<div><\/div>\n<div>For example, the following image with the public ID &#8216;fashion1&#8217; was uploaded to Cloudinary:<\/div>\n<div><\/div>\n<div><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_0.5\/f_auto,q_auto\/v1353233332\/fashion1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" style=\"margin-left: auto; margin-right: auto;\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_0.5\/v1353233332\/fashion1.jpg\" alt=\"\" width=\"112\" height=\"190\" \/><\/a><\/div>\n<div><\/div>\n<div><\/div>\n<div>Using Cloudinary&#8217;s <a href=\"https:\/\/cloudinary.com\/blog\/restful_api_for_managing_your_website_s_images_and_other_online_assets\" target=\"_blank\" rel=\"noopener\">Admin API<\/a>, you can extract the photo&#8217;s main colors by setting the &#8216;<span style=\"color: #bb0000;\"><strong>colors<\/strong><\/span>&#8216; parameter to <strong>true<\/strong> (see <a href=\"https:\/\/cloudinary.com\/documentation\/admin_api#browse_resources\" target=\"_blank\" rel=\"noopener\">reference documentation<\/a>). Here are examples for <strong>Ruby<\/strong>, <strong>PHP<\/strong>, <strong>Node.js<\/strong> and <strong>Python<\/strong>:<\/div>\n<pre>Cloudinary::Api.resource('fashion1', :colors =&gt; true)\n<\/pre>\n<pre>$api-&gt;resource(\"fashion1\", array(\"colors\" =&gt; TRUE));\n<\/pre>\n<pre>cloudinary.api.resource('fashion1', \u00a0\n                        function(result) \u00a0{ console.log(result) }, { colors: true });\n<\/pre>\n<pre>cloudinary.api.resource(\"fashion1\", colors = True)\n<\/pre>\n<div><\/div>\n<div>Below is the JSON result of this API call. It seems that the main colors of this image are white (50.7%) and blue (27.8%), with touches of gray and brown. Cool.<\/div>\n<pre>{\n  \"public_id\": \"fashion1\",\n  \"width\": 225,\n  \"height\": 380,\n  ...\n  \"predominant\": {\n    \"google\": [\n      [ \"white\", 50.7 ],\n      [ \"blue\",  27.8 ],\n      [ \"gray\", 11.2 ],\n      [ \"brown\", 5.1]\n    ]\n  }\n}\n<\/pre>\n<div>Using this info, you can keep the color mapping in your model and allow clothes to be searched based on colors. Searching for blue clothes should return this product.<\/div>\n<div><\/div>\n<div>Another result you get as part of the color information API is a <strong>histogram of 32 RGB colors<\/strong> that best represent the image. The following JSON snippet was also included in the result of the API call.<\/div>\n<pre>{\n  \"public_id\": \"fashion1\",\n  ...\n  \"colors\": [[\"#FFFFFF\", 50.7], [\"#011B43\", 5.8], [\"#5077A7\", 4.9], [\"#031235\", 4.3], [\"#F4CBB4\", 3.3], [\"#3A6498\", 1.9], [\"#6284AF\", 1.9], [\"#2D5E95\", 1.9], [\"#30578B\", 1.8], [\"#080918\", 1.8], [\"#E5B09D\", 1.8], [\"#36262F\", 1.7], [\"#264876\", 1.6], [\"#281A25\", 1.5], [\"#486A99\", 1.4], [\"#E3D6CF\", 1.4], [\"#4D3135\", 1.4], [\"#07264F\", 1.2], [\"#664E55\", 1.1], [\"#6E443C\", 1.0]]\n}\n<\/pre>\n<div>As you can see, you get RGB format and percentage breakdown of the 32 colors that best represent the image. &#8216;#FFFFFF&#8217; is white, representing around half of the image, followed by multiple blue shades (e.g., &#8216;#011B43&#8217; is 5.8%).<\/div>\n<div><\/div>\n<h3 id=\"face_detection_info\" style=\"padding-top: 40px;\">Face detection info<\/h3>\n<div>Cloudinary supports <a href=\"https:\/\/cloudinary.com\/blog\/face_detection_based_cropping\" target=\"_blank\" rel=\"noopener\">face detection based cropping<\/a>\u00a0and <a href=\"https:\/\/cloudinary.com\/blog\/automatic_face_blurring_in_images_made_easy\" target=\"_blank\" rel=\"noopener\">pixelation<\/a>. Either a single face or multiple faces can be automatically detected. Our API now supports returning additional information regarding the detected faces in an uploaded photo.<\/div>\n<div><\/div>\n<div>Simply set the &#8216;<span style=\"color: #bb0000;\"><strong>faces<\/strong><\/span>&#8216; parameter to <strong>true<\/strong> in the same method we showed above for &#8216;<strong>colors<\/strong>&#8216;. Note that you can enable multiple flags in a single call for fetching all information at once. The result includes the exact coordinates of all detected faces, allowing you to easily find out how many faces are available in the photo and their exact positions.<\/div>\n<div><\/div>\n<div>The following Ruby command asks for the faces information of the &#8216;fashion1&#8217; image:<\/div>\n<pre>Cloudinary::Api.resource('fashion1', :faces =&gt; true)\n<\/pre>\n<div>Here is the JSON result:<\/div>\n<pre>{\n  \"public_id\": \"fashion1\",\n  ...\n  \"faces\": [[99, 21, 64, 87]]\n}\n<\/pre>\n<div><\/div>\n<div>As you can see, a single face was correctly detected. It is positioned in the 99,21 &#8211; 64,87 rectangle of the original image.<\/div>\n<div><\/div>\n<div>Same works for images with multiple faces:<\/div>\n<div><\/div>\n<div><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/fetch\/w_0.5\/http:\/\/upload.wikimedia.org\/wikipedia\/commons\/4\/45\/Spain_national_football_team_Euro_2012_final.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"margin-left: auto; margin-right: auto;\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/fetch\/w_0.5\/http:\/\/upload.wikimedia.org\/wikipedia\/commons\/4\/45\/Spain_national_football_team_Euro_2012_final.jpg\" alt=\"\" width=\"328\" height=\"217\" \/><\/a><\/div>\n<pre>{\n  ...\n  \"faces\":  [ [513, 19, 38, 52], [409, 26, 40, 54], [79, 31, 43, 59], [232, 32, 40, 54], [321, 33, 41, 57], [160, 37, 43, 59], [211, 153, 43, 59], [503, 151, 43, 59], [113, 162, 40, 54], [427, 160, 45, 61], [307, 172, 48, 65] ]\n} \n<\/pre>\n<div>Note that face detection does not achieve 100% accuracy. If you need better accuracy, human moderation is recommended.<\/div>\n<div><\/div>\n<h3>Camera information &#8211; Exchangeable image file format (Exif)<\/h3>\n<div><strong>**Update March 2017:<\/strong> The exif parameter has been deprecated. The exif data can now be extracted using the image_metadata parameter.<\/div>\n<div><\/div>\n<div>Modern digital cameras and smartphones store additional metadata as part of the image files you shoot. Such information includes picture orientation, timestamps, camera model information, photo exposure, GPS location and more.<\/div>\n<div><\/div>\n<div>By setting the &#8216;<span style=\"color: #bb0000;\"><strong>exif<\/strong><\/span>&#8216; parameter to true, Cloudinary&#8217;s API can extract metadata\u00a0from image&#8217;s (see our <a href=\"https:\/\/cloudinary.com\/documentation\/admin_api#browse_resources\" target=\"_blank\" rel=\"noopener\">reference documentation<\/a>). In the sections above we&#8217;ve shown how to use the Admin API for fetching information of previously uploaded images. You can also request this information while uploading the photos, so it is returned as part of an upload response.<\/div>\n<div><\/div>\n<div>For example, the following PHP command uploaded to Cloudinary a photo that was taken by an iPhone 4 in a portrait orientation.<\/div>\n<pre>CloudinaryUploader::upload(\"exif_sample.jpeg\", \n   array(\"public_id\" =&gt; \"exif_sample\", \"colors\" =&gt; TRUE, \"exif\" =&gt; TRUE))\n<\/pre>\n<div><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/f_auto,q_auto\/exif_sample.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" style=\"margin-left: auto; margin-right: auto;\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_0.12\/exif_sample.jpg\" alt=\"\" width=\"311\" height=\"232\" \/><\/a><\/div>\n<div><\/div>\n<div>Here is the JSON of the upload response including the requested <strong>Exif<\/strong> and <strong>Colors<\/strong> information:<\/div>\n<pre>{ \n  \"public_id\": \"exif_sample\",\n  \"width\": 2592,\n  \"height\": 1936,\n  ...\n  \"exif\": {\n    \"ApertureValue\": \"4281\/1441\",\n    \"ColorSpace\": \"1\",\n    \"ComponentsConfiguration\": \"1, 2, 3, 0\",\n    \"Compression\": \"6\",\n    \"DateTime\": \"2010:12:27 11:17:34\",\n    \"DateTimeDigitized\": \"2010:12:27 11:17:34\",\n    \"DateTimeOriginal\": \"2010:12:27 11:17:34\",\n    \"ExifImageLength\": \"1936\",\n    \"ExifImageWidth\": \"2592\",\n    \"ExifOffset\": \"204\",\n    \"ExifVersion\": \"48, 50, 50, 49\",\n    \"ExposureMode\": \"0\",\n    \"ExposureProgram\": \"2\",\n    \"ExposureTime\": \"1\/4309\",\n    \"Flash\": \"24\",\n    \"FlashPixVersion\": \"48, 49, 48, 48\",\n    \"FNumber\": \"14\/5\",\n    \"FocalLength\": \"77\/20\",\n    \"GPSAltitude\": \"20723\/924\",\n    \"GPSAltitudeRef\": \"0\",\n    \"GPSImgDirection\": \"42155\/344\",\n    \"GPSImgDirectionRef\": \"T\",\n    \"GPSInfo\": \"574\",\n    \"GPSLatitude\": \"21\/1, 768\/100, 0\/1\",\n    \"GPSLatitudeRef\": \"N\",\n    \"GPSLongitude\": \"86\/1, 4500\/100, 0\/1\",\n    \"GPSLongitudeRef\": \"W\",\n    \"GPSTimeStamp\": \"17\/1, 17\/1, 3326\/100\",\n    \"ISOSpeedRatings\": \"80\",\n    \"JPEGInterchangeFormat\": \"870\",\n    \"JPEGInterchangeFormatLength\": \"9932\",\n    \"Make\": \"Apple\",\n    \"MeteringMode\": \"1\",\n    \"Model\": \"iPhone 4\",\n    \"Orientation\": \"6\",\n    \"ResolutionUnit\": \"2\",\n    \"SceneCaptureType\": \"0\",\n    \"SensingMethod\": \"2\",\n    \"Sharpness\": \"2\",\n    \"ShutterSpeedValue\": \"4781\/396\",\n    \"Software\": \"4.2.1\",\n    \"SubjectArea\": \"1295, 967, 699, 696\",\n    \"WhiteBalance\": \"0\",\n    \"XResolution\": \"72\/1\",\n    \"YCbCrPositioning\": \"1\",\n    \"YResolution\": \"72\/1\"\n  },\n  \"colors\":[[\"#CBC9C5\",10.2],[\"#C4BCB4\",9.0],[\"#1888AB\",6.0],[\"#202618\",6.0],[\"#226391\",5.4],[\"#223A62\",4.3],[\"#B9B4AD\",3.8],[\"#2F88A1\",3.5],[\"#C9C3BA\",3.4],[\"#7492B2\",3.4],[\"#157193\",3.1],[\"#96ABCC\",2.9],[\"#C8B495\",2.8],[\"#4F97AB\",2.8],[\"#484033\",2.7],[\"#669FAD\",2.5],[\"#A0A29E\",2.4],[\"#38A7C8\",2.3],[\"#57A5B7\",2.3],[\"#2D8FAF\",2.2],[\"#ACCADC\",2.1],[\"#073554\",2.0],[\"#60AFC7\",2.0],[\"#1D4A6F\",2.0],[\"#A39477\",1.9],[\"#D1C4A0\",1.8],[\"#296F96\",1.7],[\"#4F6E91\",1.5],[\"#5F5F57\",1.4],[\"#90AECB\",1.0]],\n  \"predominant\": {\"google\":[[\"teal\",41.7],[\"brown\",35.6],[\"blue\",12.1],[\"green\",8.4]]\n}<\/pre>\n<div>By the way, you can also use Cloudinary&#8217;s Exif-based automatic rotation by setting the &#8216;<span style=\"color: #bb0000;\"><strong>angle<\/strong><\/span>&#8216; parameter (&#8216;<span style=\"color: #bb0000;\"><strong>a<\/strong><\/span>&#8216; for URLs) to &#8216;<span style=\"color: #bb0000;\"><strong>exif<\/strong><\/span>&#8216;. For example:<\/div>\n<div><\/div>\n<div style=\"text-align: center;\"><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/a_exif\/exif_sample.jpg\" target=\"_blank\" rel=\"noopener\">https:\/\/res.cloudinary.com\/demo\/image\/upload\/<strong>a_exif<\/strong>\/exif_sample.jpg<\/a><\/div>\n<div><\/div>\n<div><a href=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_0.12,a_exif\/f_auto,q_auto\/exif_sample.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" style=\"margin-left: auto; margin-right: auto;\" src=\"https:\/\/res.cloudinary.com\/demo\/image\/upload\/w_0.12,a_exif\/exif_sample.jpg\" alt=\"\" width=\"232\" height=\"311\" \/><\/a><\/div>\n<h3>Summary<\/h3>\n<div>With the additional knowledge of <a href=\"https:\/\/cloudinary.com\/glossary\/image-metadata\">image metadata<\/a> and semantic information, you can enhance your image rich web and mobile applications with little effort, while Cloudinary does all the heavy lifting for you. These additional layers of information adds an important aspect that allows Cloudinary to offer a better than ever cloud-based solution to all your online image management and transformation needs.<\/div>\n<div><\/div>\n<div>All these new features were requested by Cloudinary&#8217;s users and we thank all of you for that. We have plenty more ideas for enhancing Cloudinary&#8217;s capabilities in this area and would love <a href=\"mailto:info@cloudinary.com\" target=\"_blank\" rel=\"noopener\">to hear<\/a> your feedback and suggestions.<\/div>\n<div><\/div>\n<div>The ability to fetch <strong>Exif<\/strong>, <strong>Faces<\/strong>,\u00a0<strong>Predominant colors<\/strong> and <a href=\"https:\/\/cloudinary.com\/glossary\/color-histogram\"><strong>Color histogram<\/strong><\/a> is now available to all of Cloudinary&#8217;s plans, free and paid. <a href=\"https:\/\/cloudinary.com\/users\/register\/free\" target=\"_blank\" rel=\"noopener\">Click here<\/a>\u00a0to setup a free Cloudinary account.<\/div>\n<div><\/div>\n<h2>Want to Learn More About Digital Asset Management?<\/h2>\n<ul>\n<li><a title=\"What is Digital Asset Management and Why It Matters for Organizations\" href=\"https:\/\/cloudinary.com\/guides\/digital-asset-management\/what-is-digital-asset-management\" target=\"_blank\" rel=\"noopener\">What is Digital Asset Management and Why It Matters for Organizations<\/a><\/li>\n<li><a title=\"Reimaging DAM: The next-generation solution for marketing &amp; development\" href=\"https:\/\/cloudinary.com\/blog\/reimaging_dam_the_next_generation_solution_for_marketing_development\" target=\"_blank\" rel=\"noopener\">Reimaging DAM: The next-generation solution for marketing &amp; development<\/a><\/li>\n<li><a title=\"Digital Asset Collaboration be DAM'd\" href=\"https:\/\/cloudinary.com\/blog\/asset_collaboration_be_dam-a_cross_organizational_solution\" target=\"_blank\" rel=\"noopener\">Digital Asset Collaboration be DAM&#8217;d<\/a><\/li>\n<li><a title=\"Adding Structure to Your Asset Metadata\" href=\"https:\/\/cloudinary.com\/blog\/adding_structure_to_your_asset_metadata\" target=\"_blank\" rel=\"noopener\">Adding Structure to Your Asset Metadata<\/a><\/li>\n<li><a title=\"Share Your DAM Assets!\" href=\"https:\/\/cloudinary.com\/blog\/share_your_dam_assets\" target=\"_blank\" rel=\"noopener\">Share Your DAM Assets!<\/a><\/li>\n<li><a title=\"Automate Your Media Assets\u2019 Workflow With Machine Learning\" href=\"https:\/\/cloudinary.com\/blog\/automate_your_media_assets_workflow_with_machine_learning\" target=\"_blank\" rel=\"noopener\">Automate Your Media Assets\u2019 Workflow With Machine Learning<\/a><\/li>\n<li><a title=\"The Evolution of Digital Asset Management Systems: On-Premise, Cloud, Dynamic\" href=\"https:\/\/cloudinary.com\/guides\/digital-asset-management\/the-evolution-of-digital-asset-management-systems-on-premise-cloud-and-dynamic\" target=\"_blank\" rel=\"noopener\">The Evolution of Digital Asset Management Systems: On-Premise, Cloud, Dynamic<\/a><\/li>\n<li><a title=\"Media Asset Management and Enterprise Content Management: What\u2019s the Difference?\" href=\"https:\/\/cloudinary.com\/guides\/digital-asset-management\/media-asset-management-and-enterprise-content-management-whats-the-difference\" target=\"_blank\" rel=\"noopener\">Media Asset Management and Enterprise Content Management: What\u2019s the Difference?<\/a><\/li>\n<li><a title=\"Digital Asset Managers: What They Do and Why You Need One\" href=\"https:\/\/cloudinary.com\/guides\/digital-asset-management\/digital-asset-managers-what-they-do-and-why-you-need-one\" target=\"_blank\" rel=\"noopener\">Digital Asset Managers: What They Do and Why You Need One<\/a><\/li>\n<li><a title=\"Digital Asset Management Software: A Buyer\u2019s Guide\" href=\"https:\/\/cloudinary.com\/guides\/digital-asset-management\/digital-asset-management-solutions-a-buyers-guide\" target=\"_blank\" rel=\"noopener\">Digital Asset Management Software: A Buyer\u2019s Guide<\/a><\/li>\n<li><a title=\"DAM Best Practices and Critical Success Factors\" href=\"https:\/\/cloudinary.com\/guides\/digital-asset-management\/dam-best-practices-and-critical-success-factors\" target=\"_blank\" rel=\"noopener\">DAM Best Practices and Critical Success Factors<\/a><\/li>\n<li><a title=\"A unified approach to DAM across the asset lifecycle\" href=\"https:\/\/cloudinary.com\/blog\/a_unified_approach_to_digital_asset_management_across_the_asset_lifecycle\" target=\"_blank\" rel=\"noopener\">A unified approach to DAM across the asset lifecycle<\/a><\/li>\n<li><a title=\"How a cloud-native DAM optimizes customer experiences\" href=\"https:\/\/cloudinary.com\/blog\/how_cloud_native_dam_optimizes_customer_experiences\" target=\"_blank\" rel=\"noopener\">How a cloud-native DAM optimizes customer experiences<\/a><\/li>\n<li><a title=\"Bringing the Digital Ecosystem Together with a DAM Platform\" href=\"https:\/\/cloudinary.com\/blog\/bringing_the_digital_ecosystem_together_with_a_dam_platform\" target=\"_blank\" rel=\"noopener\">Bringing the Digital Ecosystem Together with a DAM Platform<\/a><\/li>\n<li><a title=\"Don\u2019t let your digital assets become a liability!\" href=\"https:\/\/cloudinary.com\/blog\/don_t_let_your_digital_assets_become_a_liability\" target=\"_blank\" rel=\"noopener\">Don\u2019t let your digital assets become a liability!<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When images are involved, web developers have a large set of relevant tools at their disposal. You can display images in your web sites and mobile applications. You can transform and transform such images using image editing and transformation software or cloud-based solutions like Cloudinary. But there are other types of data embedded in image [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":21167,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[332,91,214,229,257],"class_list":["post-21166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-api","tag-django","tag-node","tag-php","tag-ruby-on-rails"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Extracting Metadata and Exif Data from Images via API<\/title>\n<meta name=\"description\" content=\"Learn how to leverage Cloudinary&#039;s cloud-based API for applying effects on images to automatically blur faces using the pixelate effect\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"API for Extracting Semantic Image Data - Colors, Faces, Exif Data, and More\" \/>\n<meta property=\"og:description\" content=\"Learn how to leverage Cloudinary&#039;s cloud-based API for applying effects on images to automatically blur faces using the pixelate effect\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-21T10:14:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-03T21:16:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"1540\" \/>\n\t<meta property=\"og:image:height\" content=\"847\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"API for Extracting Semantic Image Data &#8211; Colors, Faces, Exif Data, and More\",\"datePublished\":\"2012-11-21T10:14:19+00:00\",\"dateModified\":\"2025-08-03T21:16:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more\"},\"wordCount\":1167,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA\",\"keywords\":[\"API\",\"Django\",\"Node\",\"PHP\",\"Ruby on Rails\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2012\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more\",\"url\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more\",\"name\":\"Extracting Metadata and Exif Data from Images via API\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA\",\"datePublished\":\"2012-11-21T10:14:19+00:00\",\"dateModified\":\"2025-08-03T21:16:57+00:00\",\"description\":\"Learn how to leverage Cloudinary's cloud-based API for applying effects on images to automatically blur faces using the pixelate effect\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA\",\"width\":1540,\"height\":847},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API for Extracting Semantic Image Data &#8211; Colors, Faces, Exif Data, and More\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Extracting Metadata and Exif Data from Images via API","description":"Learn how to leverage Cloudinary's cloud-based API for applying effects on images to automatically blur faces using the pixelate effect","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more","og_locale":"en_US","og_type":"article","og_title":"API for Extracting Semantic Image Data - Colors, Faces, Exif Data, and More","og_description":"Learn how to leverage Cloudinary's cloud-based API for applying effects on images to automatically blur faces using the pixelate effect","og_url":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more","og_site_name":"Cloudinary Blog","article_published_time":"2012-11-21T10:14:19+00:00","article_modified_time":"2025-08-03T21:16:57+00:00","og_image":[{"width":1540,"height":847,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more"},"author":{"name":"","@id":""},"headline":"API for Extracting Semantic Image Data &#8211; Colors, Faces, Exif Data, and More","datePublished":"2012-11-21T10:14:19+00:00","dateModified":"2025-08-03T21:16:57+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more"},"wordCount":1167,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA","keywords":["API","Django","Node","PHP","Ruby on Rails"],"inLanguage":"en-US","copyrightYear":"2012","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more","url":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more","name":"Extracting Metadata and Exif Data from Images via API","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA","datePublished":"2012-11-21T10:14:19+00:00","dateModified":"2025-08-03T21:16:57+00:00","description":"Learn how to leverage Cloudinary's cloud-based API for applying effects on images to automatically blur faces using the pixelate effect","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA","width":1540,"height":847},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/api_for_extracting_semantic_image_data_colors_faces_exif_data_and_more#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"API for Extracting Semantic Image Data &#8211; Colors, Faces, Exif Data, and More"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649719213\/Web_Assets\/blog\/16_API_for_extracting_data\/16_API_for_extracting_data.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=21166"}],"version-history":[{"count":7,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21166\/revisions"}],"predecessor-version":[{"id":38133,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/21166\/revisions\/38133"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/21167"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=21166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=21166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=21166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}