{"id":1477,"date":"2026-02-01T22:11:30","date_gmt":"2026-02-01T22:11:30","guid":{"rendered":"https:\/\/kourentzes.com\/konstantinos\/?p=1477"},"modified":"2026-02-01T22:11:33","modified_gmt":"2026-02-01T22:11:33","slug":"wordpress-media-json-export-plugin","status":"publish","type":"post","link":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/","title":{"rendered":"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management"},"content":{"rendered":"\n<p>Streamline your WordPress media workflow with this lightweight plugin that exports selected media files to a publicly accessible JSON endpoint, perfect for headless CMS implementations, mobile apps, and third-party integrations.<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-23a70583-81c9-45d5-867b-f04764a24ff4\" href=\"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/media-json-exporter-plugin.zip\">media-json-exporter-plugin<\/a><a href=\"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/media-json-exporter-plugin.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-23a70583-81c9-45d5-867b-f04764a24ff4\">Download<\/a><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>In today&#8217;s interconnected digital ecosystem, WordPress often serves as more than just a website platform\u2014it&#8217;s a content management system that feeds data to mobile applications, external services, and headless frontend frameworks. The&nbsp;<strong>Media JSON Exporter<\/strong>&nbsp;plugin bridges this gap by providing a simple, elegant solution for exposing selected media files through a JSON API endpoint.<\/p>\n\n\n\n<p>Whether you&#8217;re building a React Native mobile app, integrating with a Next.js frontend, or simply need a programmatic way to access your media library, this plugin offers a straightforward approach without the complexity of custom REST API development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem: Media Access Beyond WordPress<\/h2>\n\n\n\n<p>WordPress developers frequently encounter scenarios where external applications need access to specific media files. Traditional solutions involve:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Building custom REST API endpoints (time-consuming and requires ongoing maintenance)<\/li>\n\n\n\n<li>Using the full WordPress REST API (often provides too much data and requires authentication)<\/li>\n\n\n\n<li>Manual CSV exports (static, non-scalable, and error-prone)<\/li>\n\n\n\n<li>Database queries from external applications (security risks and coupling issues)<\/li>\n<\/ul>\n\n\n\n<p>Each approach has significant drawbacks. Custom endpoints require development time and WordPress API knowledge. The native REST API exposes more data than needed. Manual exports become outdated immediately. Direct database access creates security vulnerabilities.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution: Selective JSON Export<\/h2>\n\n\n\n<p>Media JSON Exporter takes a different approach: it allows content managers to selectively mark media files for export through a simple checkbox interface, then automatically generates and maintains a publicly accessible JSON file containing only the chosen media URLs and metadata.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Features<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Simple User Interface<\/h4>\n\n\n\n<p>The plugin adds a single checkbox labeled &#8220;Include in JSON Export&#8221; to the media editor screen. No complex configuration, no technical knowledge required\u2014just check a box and save.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2. Automatic Synchronization<\/h4>\n\n\n\n<p>The JSON file regenerates automatically whenever media is added, edited, or deleted. Your external applications always have access to the latest data without manual intervention.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. Public JSON Endpoint<\/h4>\n\n\n\n<p>The exported JSON file lives at a predictable URL:&nbsp;<code>\/wp-content\/uploads\/media-export.json<\/code>. No authentication required, no API keys to manage\u2014simple HTTP GET requests return your media data.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4. Rich Metadata<\/h4>\n\n\n\n<p>Each exported media item includes comprehensive information:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ID:<\/strong>\u00a0WordPress attachment ID for reference<\/li>\n\n\n\n<li><strong>Title:<\/strong>\u00a0The media file&#8217;s title<\/li>\n\n\n\n<li><strong>URL:<\/strong>\u00a0Direct public URL to the file<\/li>\n\n\n\n<li><strong>Type:<\/strong>\u00a0MIME type (image\/jpeg, image\/png, video\/mp4, etc.)<\/li>\n\n\n\n<li><strong>Alt Text:<\/strong>\u00a0Accessibility alternative text<\/li>\n\n\n\n<li><strong>Description:<\/strong>\u00a0Full media description<\/li>\n\n\n\n<li><strong>Caption:<\/strong>\u00a0Media caption text<\/li>\n\n\n\n<li><strong>Date:<\/strong>\u00a0Upload\/modification timestamp<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">5. Admin Management Interface<\/h4>\n\n\n\n<p>A dedicated admin page under&nbsp;<strong>Media \u2192 JSON Export<\/strong>&nbsp;provides:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The public JSON URL for easy copying<\/li>\n\n\n\n<li>Count of currently exported media files<\/li>\n\n\n\n<li>Manual regeneration button for troubleshooting<\/li>\n\n\n\n<li>Clear usage instructions<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Real-World Use Cases<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Headless CMS Architecture<\/h3>\n\n\n\n<p>Modern web applications often separate the frontend from the backend. A React or Vue.js application might pull content from WordPress while maintaining its own interface. Media JSON Exporter allows you to mark specific images for use in your frontend application, creating a curated media feed.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ React component example\nuseEffect(() => {\n  fetch('https:\/\/yoursite.com\/wp-content\/uploads\/media-export.json')\n    .then(response => response.json())\n    .then(data => {\n      setGalleryImages(data.filter(item => item.type.startsWith('image\/')));\n    });\n}, []);\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">\/\/ React component example<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">useEffect(() =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  fetch(&#39;https<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #EEFFFF\">\/\/yoursite.com\/wp-content\/uploads\/media-export.json<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    .then(response =&gt; response.json())<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    .then(data =&gt; {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">      setGalleryImages(data.<\/span><span style=\"color: #B2CCD6\">filter<\/span><span style=\"color: #EEFFFF\">(item =&gt; item.type.startsWith(&#39;<\/span><span style=\"color: #B2CCD6\">image<\/span><span style=\"color: #EEFFFF\">\/&#39;)))<\/span><span style=\"color: #89DDFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">}<\/span><span style=\"color: #EEFFFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">}, <\/span><span style=\"color: #89DDFF\">[]<\/span><span style=\"color: #EEFFFF\">);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#212121;color:#d5ffff;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Mobile Application Integration<\/h3>\n\n\n\n<p>Mobile apps built with React Native, Flutter, or native iOS\/Android often need to display images and media from a WordPress site. Rather than implementing OAuth authentication and parsing the full REST API, developers can simply fetch the JSON export:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ React Native example\nconst loadMedia = async () => {\n  const response = await fetch('https:\/\/yoursite.com\/wp-content\/uploads\/media-export.json');\n  const mediaData = await response.json();\n  \n  \/\/ Filter for specific image types\n  const banners = mediaData.filter(item => \n    item.title.includes('banner') &amp;&amp; item.type === 'image\/png'\n  );\n  \n  setBannerImages(banners);\n};<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">\/\/ React Native example<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">const loadMedia = async () =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  const response = await fetch(&#39;https<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #EEFFFF\">\/\/yoursite.com\/wp-content\/uploads\/media-export.json<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  const mediaData = await response.json()<\/span><span style=\"color: #89DDFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  \/\/ <\/span><span style=\"color: #B2CCD6\">Filter<\/span><span style=\"color: #EEFFFF\"> for specific <\/span><span style=\"color: #B2CCD6\">image<\/span><span style=\"color: #EEFFFF\"> types<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  const banners = mediaData.<\/span><span style=\"color: #B2CCD6\">filter<\/span><span style=\"color: #EEFFFF\">(item =&gt; <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    item.title.includes(&#39;banner&#39;) &amp;&amp; item.type === &#39;<\/span><span style=\"color: #B2CCD6\">image<\/span><span style=\"color: #EEFFFF\">\/png&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  )<\/span><span style=\"color: #89DDFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  setBannerImages(banners)<\/span><span style=\"color: #89DDFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">}<\/span><span style=\"color: #EEFFFF\">;<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#212121;color:#d5ffff;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Dynamic Image Galleries<\/h3>\n\n\n\n<p>Create client-side photo galleries that update automatically as you add new images to WordPress. Mark gallery images with the export checkbox, and your JavaScript gallery fetches the latest set on each page load.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CDN Distribution Lists<\/h3>\n\n\n\n<p>Generate manifests for CDN synchronization by exporting specific media files. Your deployment scripts can parse the JSON to identify which assets need to be pushed to your CDN.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Third-Party Service Integration<\/h3>\n\n\n\n<p>Services like email marketing platforms, social media schedulers, or content aggregators can pull your curated media without WordPress authentication. Simply provide the JSON URL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Technical Implementation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">JSON Structure<\/h3>\n\n\n\n<p>The exported file contains a clean, flat array of media objects:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;\n  {\n    \"id\": 245,\n    \"title\": \"Product Hero Image\",\n    \"url\": \"https:\/\/yoursite.com\/wp-content\/uploads\/2024\/01\/hero-product.jpg\",\n    \"type\": \"image\/jpeg\",\n    \"alt\": \"Premium wireless headphones on marble surface\",\n    \"description\": \"Main product photography for homepage hero section\",\n    \"caption\": \"New ANC Pro Series\",\n    \"date\": \"2024-01-15 10:30:00\"\n  },\n  {\n    \"id\": 246,\n    \"title\": \"About Us Team Photo\",\n    \"url\": \"https:\/\/yoursite.com\/wp-content\/uploads\/2024\/01\/team-2024.jpg\",\n    \"type\": \"image\/jpeg\",\n    \"alt\": \"Company team members in office\",\n    \"description\": \"\",\n    \"caption\": \"Our amazing 2024 team\",\n    \"date\": \"2024-01-16 14:20:00\"\n  }\n&#93;\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF\">&#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">id<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: 245,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">title<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Product Hero Image<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">url<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">https:\/\/yoursite.com\/wp-content\/uploads\/2024\/01\/hero-product.jpg<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">type<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">image\/jpeg<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">alt<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Premium wireless headphones on marble surface<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">description<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Main product photography for homepage hero section<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">caption<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">New ANC Pro Series<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">date<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">2024-01-15 10:30:00<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">id<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: 246,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">title<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">About Us Team Photo<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">url<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">https:\/\/yoursite.com\/wp-content\/uploads\/2024\/01\/team-2024.jpg<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">type<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">image\/jpeg<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">alt<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Company team members in office<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">description<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">caption<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">Our amazing 2024 team<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">date<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #EEFFFF\">: <\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">2024-01-16 14:20:00<\/span><span style=\"color: #89DDFF\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&#93;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#212121;color:#d5ffff;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Performance Considerations<\/h3>\n\n\n\n<p>The plugin uses WordPress meta queries to efficiently retrieve only marked media files. The JSON file is static and served directly by your web server, resulting in minimal server overhead. Large media libraries with hundreds of exported files still generate lightweight JSON (typically under 100KB).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Security<\/h3>\n\n\n\n<p>The plugin follows WordPress security best practices:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prevents direct file access with\u00a0<code>ABSPATH<\/code>\u00a0checks<\/li>\n\n\n\n<li>Uses WordPress nonces for AJAX requests<\/li>\n\n\n\n<li>Checks user capabilities before allowing regeneration<\/li>\n\n\n\n<li>Only exposes media you explicitly mark for export<\/li>\n\n\n\n<li>Sets appropriate file permissions (0644) for the JSON file<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installation and Setup<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Installation Steps<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download the plugin ZIP file<\/li>\n\n\n\n<li>Upload to\u00a0<code>\/wp-content\/plugins\/media-json-exporter\/<\/code><\/li>\n\n\n\n<li>Extract the files<\/li>\n\n\n\n<li>Activate through the WordPress Plugins menu<\/li>\n\n\n\n<li>The JSON file is created automatically at\u00a0<code>\/wp-content\/uploads\/media-export.json<\/code><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Usage<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to\u00a0<strong>Media \u2192 Library<\/strong><\/li>\n\n\n\n<li>Click any media file to edit<\/li>\n\n\n\n<li>Scroll to find the &#8220;Include in JSON Export&#8221; checkbox<\/li>\n\n\n\n<li>Check the box and click\u00a0<strong>Update<\/strong><\/li>\n\n\n\n<li>Access your JSON at the public URL<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Admin Configuration<\/h3>\n\n\n\n<p>Visit&nbsp;<strong>Media \u2192 JSON Export<\/strong>&nbsp;to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Copy the public JSON URL<\/li>\n\n\n\n<li>View the current count of exported files<\/li>\n\n\n\n<li>Manually trigger regeneration if needed<\/li>\n\n\n\n<li>Access detailed usage instructions<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Customization and Extension<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Changing the JSON Filename<\/h3>\n\n\n\n<p>Edit line 15 of the plugin file to use a custom filename:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>private $json_filename = 'my-custom-media-export.json';<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Adding Custom Fields<\/h3>\n\n\n\n<p>Extend the exported data by modifying the&nbsp;<code>get_export_media()<\/code>&nbsp;method. For example, to include custom field data:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>$media_data[] = array(\n    'id' => $attachment->ID,\n    'title' => $attachment->post_title,\n    'url' => wp_get_attachment_url($attachment->ID),\n    'type' => get_post_mime_type($attachment->ID),\n    'alt' => get_post_meta($attachment->ID, '_wp_attachment_image_alt', true),\n    'description' => $attachment->post_content,\n    'caption' => $attachment->post_excerpt,\n    'date' => $attachment->post_date,\n    \n    \/\/ Custom additions\n    'photographer' => get_post_meta($attachment->ID, 'photographer_name', true),\n    'license' => get_post_meta($attachment->ID, 'image_license', true),\n    'tags' => wp_get_post_tags($attachment->ID, array('fields' => 'names')),\n);\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">$media_data<\/span><span style=\"color: #89DDFF\">[]<\/span><span style=\"color: #EEFFFF\"> = array(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;id&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> $<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">ID<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;title&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> $<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">post_title<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;url&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> wp_get_attachment_url($<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">ID),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;type&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> get_post_mime_type($<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">ID),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;alt&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> get_post_meta($<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">ID<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> &#39;_wp_attachment_image_alt&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> true),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;description&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> $<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">post_content<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;caption&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> $<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">post_excerpt<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;date&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> $<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">post_date<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    \/\/ Custom additions<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;photographer&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> get_post_meta($<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">ID<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> &#39;photographer_name&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> true),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;license&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> get_post_meta($<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">ID<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> &#39;image_license&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> true),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;tags&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> wp_get_post_tags($<\/span><span style=\"color: #FFCB6B\">attachment-<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\">ID<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> array(&#39;fields&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> &#39;names&#39;)),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#212121;color:#d5ffff;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Filtering by Media Type<\/h3>\n\n\n\n<p>You can create separate JSON exports for different media types by adding filters to the query arguments in&nbsp;<code>get_export_media()<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ Only export images\n$args = array(\n    'post_type' => 'attachment',\n    'post_status' => 'inherit',\n    'posts_per_page' => -1,\n    'post_mime_type' => 'image',\n    'meta_query' => array(\n        array(\n            'key' => '_include_in_json_export',\n            'value' => '1',\n            'compare' => '='\n        )\n    )\n);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">\/\/ Only export images<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">$args = array(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;post_type&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> &#39;attachment&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;post_status&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> &#39;inherit&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;posts_per_page&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> -1<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;post_mime_type&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> &#39;image&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    &#39;meta_query&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> array(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        array(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">            &#39;key&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> &#39;_include_in_json_export&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">            &#39;value&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> &#39;1&#39;<\/span><span style=\"color: #89DDFF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">            &#39;compare&#39; =<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> &#39;=&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">);<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#212121;color:#d5ffff;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">JSON File Not Accessible<\/h3>\n\n\n\n<p><strong>Problem:<\/strong>&nbsp;Receiving 404 errors when accessing the JSON URL.<\/p>\n\n\n\n<p><strong>Solutions:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify that\u00a0<code>\/wp-content\/uploads\/<\/code>\u00a0directory is writable<\/li>\n\n\n\n<li>Check file permissions (should be 0644)<\/li>\n\n\n\n<li>Some servers block\u00a0<code>.json<\/code>\u00a0files\u2014add a MIME type rule in\u00a0<code>.htaccess<\/code><\/li>\n\n\n\n<li>Clear any caching plugins or CDN caches<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">JSON Not Updating<\/h3>\n\n\n\n<p><strong>Problem:<\/strong>&nbsp;Changes to media not reflected in the JSON file.<\/p>\n\n\n\n<p><strong>Solutions:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visit\u00a0<strong>Media \u2192 JSON Export<\/strong>\u00a0and click &#8220;Regenerate JSON Now&#8221;<\/li>\n\n\n\n<li>Verify the checkbox is properly saved on media files<\/li>\n\n\n\n<li>Check for JavaScript errors in the browser console<\/li>\n\n\n\n<li>Disable caching plugins temporarily to test<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Permission Errors<\/h3>\n\n\n\n<p><strong>Problem:<\/strong>&nbsp;Cannot regenerate JSON file manually.<\/p>\n\n\n\n<p><strong>Solutions:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure your WordPress user has administrator privileges<\/li>\n\n\n\n<li>Check file ownership in the uploads directory<\/li>\n\n\n\n<li>Verify server write permissions<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Naming Conventions<\/h3>\n\n\n\n<p>Establish consistent naming for exported media to make filtering easier in consuming applications. Use descriptive titles that indicate the media&#8217;s purpose.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Regular Audits<\/h3>\n\n\n\n<p>Periodically review your exported media list to remove outdated files and ensure only current assets are exposed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Documentation<\/h3>\n\n\n\n<p>Document which media files are exported and why, especially in team environments where multiple people manage the media library.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Version Control<\/h3>\n\n\n\n<p>Consider versioning your JSON exports if you need to maintain backwards compatibility with older applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Caching Strategy<\/h3>\n\n\n\n<p>Implement appropriate cache headers for the JSON file based on how frequently your media changes. For frequently updated media, use shorter cache times.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Comparison with Alternatives<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">vs. WordPress REST API<\/h3>\n\n\n\n<p><strong>REST API Advantages:<\/strong>&nbsp;Full-featured, supports filtering, pagination, and authentication.<\/p>\n\n\n\n<p><strong>Media JSON Exporter Advantages:<\/strong>&nbsp;No authentication required, simpler implementation, smaller payload, faster response times for simple use cases, no need to understand WordPress API structure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">vs. Custom Endpoints<\/h3>\n\n\n\n<p><strong>Custom Endpoints Advantages:<\/strong>&nbsp;Complete control over data structure and logic.<\/p>\n\n\n\n<p><strong>Media JSON Exporter Advantages:<\/strong>&nbsp;Zero development time, automatic maintenance, no coding required, non-technical users can manage exports.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">vs. GraphQL<\/h3>\n\n\n\n<p><strong>GraphQL Advantages:<\/strong>&nbsp;Flexible queries, fetch exactly what you need, strong typing.<\/p>\n\n\n\n<p><strong>Media JSON Exporter Advantages:<\/strong>&nbsp;No additional server setup, works everywhere, simpler for basic needs, no query language to learn.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Future Enhancements<\/h2>\n\n\n\n<p>While the current version provides solid functionality, potential future improvements could include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Multiple Export Groups:<\/strong>\u00a0Create separate JSON files for different categories of media<\/li>\n\n\n\n<li><strong>Scheduled Regeneration:<\/strong>\u00a0Option to regenerate on a schedule rather than on every change<\/li>\n\n\n\n<li><strong>Image Size Variants:<\/strong>\u00a0Include URLs for different image sizes (thumbnail, medium, large)<\/li>\n\n\n\n<li><strong>Webhook Notifications:<\/strong>\u00a0Notify external services when the JSON file updates<\/li>\n\n\n\n<li><strong>CSV Export Option:<\/strong>\u00a0Alternative export format for spreadsheet users<\/li>\n\n\n\n<li><strong>Bulk Selection:<\/strong>\u00a0Add bulk actions to the media library for faster marking<\/li>\n\n\n\n<li><strong>Custom Taxonomies:<\/strong>\u00a0Filter exports by media categories or tags<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The Media JSON Exporter plugin solves a common WordPress challenge with elegant simplicity. By providing a straightforward interface for selectively exposing media through a JSON endpoint, it enables headless CMS architectures, mobile app integrations, and third-party service connections without the complexity of custom API development.<\/p>\n\n\n\n<p>Whether you&#8217;re a developer building a React frontend, a mobile app creator needing image assets, or a content manager preparing media for external distribution, this plugin offers a practical, maintenance-free solution. Its automatic synchronization ensures your external applications always have access to current data, while its selective export model maintains security by only exposing intentionally marked files.<\/p>\n\n\n\n<p>For WordPress sites that need to bridge the gap between their media library and the broader digital ecosystem, Media JSON Exporter provides an essential tool that&#8217;s both powerful in capability and simple in execution.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Download:<\/strong>&nbsp;The Media JSON Exporter plugin is available as a free download with full source code and documentation.<\/p>\n\n\n\n<p><strong>Support:<\/strong>&nbsp;For questions, feature requests, or bug reports, visit the plugin&#8217;s GitHub repository or contact the author.<\/p>\n\n\n\n<p><strong>License:<\/strong>&nbsp;GPL v2 or later<\/p>\n\n\n\n<p><strong>Author:<\/strong>&nbsp;Konstantinos Kourentzes<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Streamline your WordPress media workflow with this lightweight plugin that exports selected media files to a publicly accessible JSON endpoint, perfect for headless CMS implementations, mobile apps, and third-party integrations.<\/p>\n","protected":false},"author":1,"featured_media":1479,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1210],"tags":[1198,1202,1197,1193,1196,1192,1206,1186,1189,1191,1208,1195,1207,1200,1190,1205,1199,500,1194,1209,1188,1203,1201,1187,1204],"class_list":["post-1477","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wp-plugins","tag-api-endpoint","tag-cdn-integration","tag-content-management","tag-dynamic-galleries","tag-frontend-development","tag-headless-cms","tag-image-export","tag-json-api","tag-media-export","tag-media-library","tag-media-management","tag-mobile-app-integration","tag-plugin-development","tag-react-integration","tag-rest-api-alternative","tag-vue-js","tag-web-api","tag-web-development","tag-wordpress","tag-wordpress-automation","tag-wordpress-development","tag-wordpress-json","tag-wordpress-media","tag-wordpress-plugins","tag-wordpress-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Media JSON Exporter: A WordPress Plugin for Dynamic Media Management - konstantinos.kourentzes.com<\/title>\n<meta name=\"description\" content=\"Discover Media JSON Exporter, a lightweight WordPress plugin that exports selected media files to a public JSON endpoint. Perfect for headless CMS, mobile apps, and third-party integrations without complex API setup.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management - konstantinos.kourentzes.com\" \/>\n<meta property=\"og:description\" content=\"Discover Media JSON Exporter, a lightweight WordPress plugin that exports selected media files to a public JSON endpoint. Perfect for headless CMS, mobile apps, and third-party integrations without complex API setup.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"konstantinos.kourentzes.com\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-01T22:11:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-01T22:11:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Konstantinos Kourentzes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@kkourentzes\" \/>\n<meta name=\"twitter:site\" content=\"@kkourentzes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Konstantinos Kourentzes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/\"},\"author\":{\"name\":\"Konstantinos Kourentzes\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\"},\"headline\":\"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management\",\"datePublished\":\"2026-02-01T22:11:30+00:00\",\"dateModified\":\"2026-02-01T22:11:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/\"},\"wordCount\":1529,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\"},\"image\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png\",\"keywords\":[\"API endpoint\",\"CDN integration\",\"content management\",\"dynamic galleries\",\"frontend development\",\"headless CMS\",\"image export\",\"JSON API\",\"media export\",\"media library\",\"media management\",\"mobile app integration\",\"plugin development\",\"React integration\",\"REST API alternative\",\"Vue.js\",\"web API\",\"web development\",\"WordPress\",\"WordPress automation\",\"WordPress development\",\"WordPress JSON\",\"WordPress media\",\"WordPress plugins\",\"WordPress tools\"],\"articleSection\":[\"WP-plugins\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/\",\"name\":\"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management - konstantinos.kourentzes.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png\",\"datePublished\":\"2026-02-01T22:11:30+00:00\",\"dateModified\":\"2026-02-01T22:11:33+00:00\",\"description\":\"Discover Media JSON Exporter, a lightweight WordPress plugin that exports selected media files to a public JSON endpoint. Perfect for headless CMS, mobile apps, and third-party integrations without complex API setup.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png\",\"contentUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png\",\"width\":1024,\"height\":1024,\"caption\":\"A_modern_minimalist_technical_illustration\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2026\\\/02\\\/01\\\/wordpress-media-json-export-plugin\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#website\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/\",\"name\":\"kourentzes.com\\\/konstantinos\",\"description\":\"Konstantinos Kourentzes\",\"publisher\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\",\"name\":\"Konstantinos Kourentzes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\",\"contentUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\",\"width\":2835,\"height\":2268,\"caption\":\"Konstantinos Kourentzes\"},\"logo\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\"},\"description\":\"Konstantinos Kourentzes is a distinguished technologist and Enterprise Resource Planning (ERP) consultant renowned for his expertise in delivering cutting-edge technology solutions. Based in Marousi, Greece, he has a knack for seamlessly integrating data-driven systems, empowering businesses to streamline their operations and achieve peak efficiency. A fervent proponent of innovation, Konstantinos is committed to instigating revolutionary shifts within organizations. His approach revolves around delivering custom-tailored ERP solutions that seamlessly align with each business's distinctive requirements. This catalyzes enduring collaborations rooted in unwavering trust and tangible outcomes. With a background rooted in technology and a passion for optimizing business processes, Konstantinos is your go-to partner for harnessing the power of ERP systems to unlock operational excellence. Connect with Konstantinos on LinkedIn to explore how his technological insights can drive your business to new heights.\",\"sameAs\":[\"https:\\\/\\\/kourentzes.com\\\/konstantinos\",\"https:\\\/\\\/x.com\\\/kkourentzes\"],\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/author\\\/administrator\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management - konstantinos.kourentzes.com","description":"Discover Media JSON Exporter, a lightweight WordPress plugin that exports selected media files to a public JSON endpoint. Perfect for headless CMS, mobile apps, and third-party integrations without complex API setup.","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:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/","og_locale":"en_US","og_type":"article","og_title":"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management - konstantinos.kourentzes.com","og_description":"Discover Media JSON Exporter, a lightweight WordPress plugin that exports selected media files to a public JSON endpoint. Perfect for headless CMS, mobile apps, and third-party integrations without complex API setup.","og_url":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/","og_site_name":"konstantinos.kourentzes.com","article_published_time":"2026-02-01T22:11:30+00:00","article_modified_time":"2026-02-01T22:11:33+00:00","og_image":[{"width":1024,"height":1024,"url":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png","type":"image\/png"}],"author":"Konstantinos Kourentzes","twitter_card":"summary_large_image","twitter_creator":"@kkourentzes","twitter_site":"@kkourentzes","twitter_misc":{"Written by":"Konstantinos Kourentzes","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#article","isPartOf":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/"},"author":{"name":"Konstantinos Kourentzes","@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822"},"headline":"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management","datePublished":"2026-02-01T22:11:30+00:00","dateModified":"2026-02-01T22:11:33+00:00","mainEntityOfPage":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/"},"wordCount":1529,"commentCount":0,"publisher":{"@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822"},"image":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png","keywords":["API endpoint","CDN integration","content management","dynamic galleries","frontend development","headless CMS","image export","JSON API","media export","media library","media management","mobile app integration","plugin development","React integration","REST API alternative","Vue.js","web API","web development","WordPress","WordPress automation","WordPress development","WordPress JSON","WordPress media","WordPress plugins","WordPress tools"],"articleSection":["WP-plugins"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/","url":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/","name":"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management - konstantinos.kourentzes.com","isPartOf":{"@id":"https:\/\/kourentzes.com\/konstantinos\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#primaryimage"},"image":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png","datePublished":"2026-02-01T22:11:30+00:00","dateModified":"2026-02-01T22:11:33+00:00","description":"Discover Media JSON Exporter, a lightweight WordPress plugin that exports selected media files to a public JSON endpoint. Perfect for headless CMS, mobile apps, and third-party integrations without complex API setup.","breadcrumb":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#primaryimage","url":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png","contentUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2026\/02\/emperor_kk_A_modern_minimalist_technical_illustration_showing_345f9629-41ab-4908-a8f7-f057bf089019_3.png","width":1024,"height":1024,"caption":"A_modern_minimalist_technical_illustration"},{"@type":"BreadcrumbList","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2026\/02\/01\/wordpress-media-json-export-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kourentzes.com\/konstantinos\/"},{"@type":"ListItem","position":2,"name":"Media JSON Exporter: A WordPress Plugin for Dynamic Media Management"}]},{"@type":"WebSite","@id":"https:\/\/kourentzes.com\/konstantinos\/#website","url":"https:\/\/kourentzes.com\/konstantinos\/","name":"kourentzes.com\/konstantinos","description":"Konstantinos Kourentzes","publisher":{"@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kourentzes.com\/konstantinos\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822","name":"Konstantinos Kourentzes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png","url":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png","contentUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png","width":2835,"height":2268,"caption":"Konstantinos Kourentzes"},"logo":{"@id":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png"},"description":"Konstantinos Kourentzes is a distinguished technologist and Enterprise Resource Planning (ERP) consultant renowned for his expertise in delivering cutting-edge technology solutions. Based in Marousi, Greece, he has a knack for seamlessly integrating data-driven systems, empowering businesses to streamline their operations and achieve peak efficiency. A fervent proponent of innovation, Konstantinos is committed to instigating revolutionary shifts within organizations. His approach revolves around delivering custom-tailored ERP solutions that seamlessly align with each business's distinctive requirements. This catalyzes enduring collaborations rooted in unwavering trust and tangible outcomes. With a background rooted in technology and a passion for optimizing business processes, Konstantinos is your go-to partner for harnessing the power of ERP systems to unlock operational excellence. Connect with Konstantinos on LinkedIn to explore how his technological insights can drive your business to new heights.","sameAs":["https:\/\/kourentzes.com\/konstantinos","https:\/\/x.com\/kkourentzes"],"url":"https:\/\/kourentzes.com\/konstantinos\/index.php\/author\/administrator\/"}]}},"_links":{"self":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts\/1477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/comments?post=1477"}],"version-history":[{"count":1,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts\/1477\/revisions"}],"predecessor-version":[{"id":1480,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts\/1477\/revisions\/1480"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/media\/1479"}],"wp:attachment":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/media?parent=1477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/categories?post=1477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/tags?post=1477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}