{"id":764,"date":"2012-07-15T14:57:41","date_gmt":"2012-07-15T04:57:41","guid":{"rendered":"http:\/\/howden.net.au\/thowden\/?p=764"},"modified":"2012-07-15T14:57:41","modified_gmt":"2012-07-15T04:57:41","slug":"oscmax-2-5-thumbnail-images-not-showing-after-upload-case-sensitive-on-linux","status":"publish","type":"post","link":"https:\/\/howden.net.au\/thowden\/2012\/07\/oscmax-2-5-thumbnail-images-not-showing-after-upload-case-sensitive-on-linux\/","title":{"rendered":"osCmax 2.5 thumbnail images not showing after upload case sensitive on Linux"},"content":{"rendered":"<p>The issue here was that loading some images as extra&#8217;s were not appearing as thumbnails in the product display. At least some of them were not. The key was that the  ones that worked had a lower case file extension and the ones that did not had upper letters. i.e. .jpg and .JPG<\/p>\n<p>I tracked this to being that the Dynamic Mopics for extra product images is case sensitive. Loading an image from another system (Windows perhaps?) with an upper case .JPG extension will not display the thumbnail without specifying the upper case extension in the admin settings for Dynamic Mopics which has all lower case extensions by default.<\/p>\n<p>Using the default installation admin settings. Load a main product image and an extra jpg type file image with the extension as uppercase .JPG<br \/>\nUsing the catalog user view inspect the product and there are no thumbnails displayed.<br \/>\nModify the admin setting to include JPG (as distinct from jpg) in the viewable formats and the images display.<\/p>\n<p>A simple fix is to force lower case extensions for all image uploads. This is a simple change.<\/p>\n<p>Edit the file catalogadminincludesmodulesproduct_image_upload.php<\/p>\n<p>line 23<br \/>\n[text]        $ext = substr(strrchr($main_image, &#8216;.&#8217;), 0);[\/text]<br \/>\nbecomes<br \/>\n[text]        $ext = strtolower(substr(strrchr($main_image, &#8216;.&#8217;), 0));[\/text]<br \/>\n(adding the additional function as a wrapper, do not forget the closing parenthesis)<\/p>\n<p>Updating an existing database is also relatively simple in phpMyAdmin or similar select the products table and run the following:<br \/>\n[text]UPDATE products SET products_image = REPLACE(products_image, &#8216;.JPG&#8217;,&#8217;.jpg&#8217;);[\/text]<\/p>\n<p>if the user wants to test the impact of this first display the table with the changes with:<br \/>\n[text]SELECT `products_id`, REPLACE(products_image, &#8216;.JPG&#8217;,&#8217;.jpg&#8217;) AS &#8216;products_image&#8217; FROM products;[\/text]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The issue here was that loading some images as extra&#8217;s were not appearing as thumbnails in the product display. At least some of them were not. The key was that the ones that worked had a lower case file extension and the ones that did not had upper letters. i.e. .jpg and .JPG I tracked [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-764","post","type-post","status-publish","format-standard","hentry","category-oscommerce-oscmax"],"_links":{"self":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/comments?post=764"}],"version-history":[{"count":0,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/764\/revisions"}],"wp:attachment":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/media?parent=764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/categories?post=764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/tags?post=764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}