{"id":26850,"date":"2013-01-15T10:15:13","date_gmt":"2013-01-15T15:15:13","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=26850"},"modified":"2016-02-24T05:13:55","modified_gmt":"2016-02-24T10:13:55","slug":"wordpress-how-to-fix-image-uploader-issue","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-fix-image-uploader-issue.html","title":{"rendered":"WordPress. How to fix Image Uploader issue"},"content":{"rendered":"<p>\r\n<\/p>\r\n<p>This tutorial shows how to fix <strong>Image Uploader<\/strong> issue in WordPress 3.5.<\/p>\r\n<p class=\"attention\">This issue may occur if you are using WordPress 3.4 template with WordPress 3.5 engine. Unfortunately, <strong>Image Uploader<\/strong> used in our WordPress 3.4 templates is not compatible with WordPress 3.5. You can just disable it and use Add Media button instead.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/12\/How_to_fix_Image_Uploader_in_WordPress-3.5-1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/12\/How_to_fix_Image_Uploader_in_WordPress-3.5-1-300x169.png\" alt=\"\" title=\"How_to_fix_Image_Uploader_in_WordPress 3.5-1\" width=\"300\" height=\"169\" class=\"alignnone size-medium wp-image-26851\" \/><\/a><\/p>\r\n<p> In order to get rid of this issue we need to modify <strong>theme-postmeta.php <\/strong> and <strong>theme-portfoliometa.php<\/strong> template files. After that we should use WordPress image uploader.<\/p>\r\n<p>1. Open <strong>themeXXXX\/includes\/theme-postmeta.php<\/strong> file in the editor. Please note that XXXX are actual theme numbers. Go to line 397 and remove the following code:<\/p>\r\n<pre class=\"brush:php\">\/*-----------------------------------------------------------------------------------*\/\r\n  \/* Queue Scripts *\/\r\n\/*-----------------------------------------------------------------------------------*\/\r\nfunction tz_admin_scripts() \r\n  wp_enqueue_script('media-upload');\r\n  wp_enqueue_script('thickbox');\r\n  wp_register_script('tz-upload', get_template_directory_uri() . '\/includes\/js\/upload-button.js', array('jquery','media-upload','thickbox'));\r\n  wp_enqueue_script('tz-upload');\r\n  }\r\n  function tz_admin_styles() \r\n  wp_enqueue_style('thickbox');\r\n  }\r\n  add_action('admin_print_scripts', 'tz_admin_scripts');\r\n  add_action('admin_print_styles', 'tz_admin_styles');<\/pre>\r\n<p>2. Open <strong>themeXXXX\/includes\/theme-portfoliometa.php <\/strong> file. <\/p>\r\n<p>2.1. Go to line 61 and remove the following code:<\/p>\r\n<pre class=\"brush:php\">$meta_box_portfolio_image = array(\r\n  'id' =&gt; 'tz-meta-box-portfolio-image',\r\n  'title' =&gt; __('Image Uploader', 'my_framework'),\r\n  'page' =&gt; 'portfolio',\r\n  'context' =&gt; 'normal',\r\n  'priority' =&gt; 'high',\r\n  'fields' =&gt; array(\r\n  array( &quot;name&quot; =&gt; '',\r\n  &quot;desc&quot; =&gt; '',\r\n  &quot;id&quot; =&gt; $prefix . &quot;portfolio_upload_images&quot;,\r\n  &quot;type&quot; =&gt; 'button',\r\n  'std' =&gt; 'Upload Images'\r\n  )\r\n  )\r\n); <\/pre>\r\n<p>2.2. Go to line 146 and remove the following code:<\/p>\r\n<pre class=\"brush:php\">\/\/If Button \r\ncase 'button': \r\necho '&lt;input style=&quot;float: left;&quot; type=&quot;button&quot;   class=&quot;button&quot; name=&quot;', $field['id'], '&quot; id=&quot;', $field['id'],   '&quot;value=&quot;', $meta ? $meta : $field['std'], '&quot; \/&gt;'; \r\necho \t'&lt;\/td&gt;', \r\n'&lt;\/tr&gt;'; \r\n\r\nbreak; <\/pre>\r\n<p>2.3. Go to line 410 and remove this code:<\/p>\r\n<pre class=\"brush:php\">\/*-----------------------------------------------------------------------------------*\/\r\n  \/*\tQueue Scripts \r\n  \/*-----------------------------------------------------------------------------------*\/ \r\n\r\n  function tz_admin_scripts_portfolio() { \r\nwp_enqueue_script('media-upload'); \r\nwp_enqueue_script('thickbox'); \r\nwp_register_script('tz-upload', get_template_directory_uri() .   '\/functions\/js\/upload-button.js',   array('jquery','media-upload','thickbox')); \r\nwp_enqueue_script('tz-upload'); \r\n} \r\nfunction tz_admin_styles_portfolio() { \r\nwp_enqueue_style('thickbox'); \r\n} \r\nadd_action('admin_print_scripts', 'tz_admin_scripts_portfolio'); \r\nadd_action('admin_print_styles', 'tz_admin_styles_portfolio');<\/pre>\r\n<p>3. Save changes and upload modified files. <\/p>\r\n<p>4. Refresh the page and use WordPress image uploaded in order to upload the images.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/12\/How_to_fix_Image_Uploader_in_WordPress-3.5-2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/12\/How_to_fix_Image_Uploader_in_WordPress-3.5-2-300x163.png\" alt=\"\" title=\"How_to_fix_Image_Uploader_in_WordPress 3.5-2\" width=\"300\" height=\"163\" class=\"alignnone size-medium wp-image-26853\" \/><\/a><\/p>\r\n<p>Please note that lines of code can be different in your specific template. Just search for code you need to remove using search function of your editor.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=f7WIZjyPaK8?width=1280&amp;height=720&amp;autoplay=0\" rel=\"prettyPhoto\">WordPress. How to fix Image Uploader issue<\/a><\/p>\r\n<\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to fix <strong>Image Uploader<\/strong> issue in WordPress 3.5.<\/p>\n","protected":false},"author":39,"featured_media":26858,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[1464,537,1145,1463,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/26850"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=26850"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/26850\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/26858"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=26850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=26850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=26850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}