{"id":4038,"date":"2023-03-19T07:16:39","date_gmt":"2023-03-19T07:16:39","guid":{"rendered":"https:\/\/rengga.dev\/blog\/?p=4038"},"modified":"2023-06-10T11:31:46","modified_gmt":"2023-06-10T11:31:46","slug":"making-wordpress-compatible-with-jfif-file-type-extension-a-simple-solution","status":"publish","type":"post","link":"https:\/\/rengga.dev\/blog\/making-wordpress-compatible-with-jfif-file-type-extension-a-simple-solution\/","title":{"rendered":"Making WordPress Compatible with Jfif File Type Extension: A Simple Solution"},"content":{"rendered":"<p>By default, WordPress does not support the JFIF file type extension. For the make simple you only need to add this code your active theme <strong>functions.php<\/strong> file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">&lt;?php\r\nadd_filter( 'upload_mimes', 'custom_mime_types', 1, 1 );\r\nfunction custom_mime_types( $mime_types ) {\r\n$mime_types['jfif'] = 'image\/jfif+xml'; \/\/ Adding .jfif extension\r\n\r\nreturn $mime_types;\r\n}\r\n?&gt;<\/pre>\n<p>Note: JFIF is a variant of the JPEG file format and is compatible with most modern web browsers. However, it is not as widely supported as the standard JPEG format, so it is important to consider the compatibility of your audience before using this file type.<\/p>\n<p>Source: <em><strong><a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/upload_mimes\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/developer.wordpress.org\/reference\/hooks\/upload_mimes\/<\/a><\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, WordPress does not support the JFIF file type extension. For <a class=\"read-more\" href=\"https:\/\/rengga.dev\/blog\/making-wordpress-compatible-with-jfif-file-type-extension-a-simple-solution\/\" title=\"Making WordPress Compatible with Jfif File Type Extension: A Simple Solution\" itemprop=\"url\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":4420,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,17],"tags":[486,487,103,604],"newstopic":[595],"class_list":{"0":"post-4038","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-web-development","8":"category-wordpress","9":"tag-jfif-file","10":"tag-jfif-wordpress","11":"tag-web-design","12":"tag-wordpress-tips","13":"newstopic-wordpress"},"_links":{"self":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/4038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/comments?post=4038"}],"version-history":[{"count":5,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/4038\/revisions"}],"predecessor-version":[{"id":4049,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/4038\/revisions\/4049"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media\/4420"}],"wp:attachment":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media?parent=4038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/categories?post=4038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/tags?post=4038"},{"taxonomy":"newstopic","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/newstopic?post=4038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}