title: how to protect uploads folder with .htaccess to only allow images in wordpress site
body: <p>I have a question i need to protect site from uploading and/or executing any scripts or files other than images only in a wordpress site.</p>
  
  <p>But i have tried few variations with .htaccess file and no success.</p>
  
  <p>The wordpress have wp-content/uploads folder where uploads are stored. And inside that it's sorted based on year / month combination in folders. I used this example from wordpress site but it somehow locks entire folder and i can't even see the images.</p>
  
  <pre><code>&lt;Files ^(*.jpeg|*.jpg|*.png|*.gif)&gt;
     order deny,allow
     deny from all
  &lt;/Files&gt;
  </code></pre>
  
  <p>So is there a working way on making it available to upload and sort images inside wp-content/upload folders and later on access them. I think the problem is that there are subfolders sinside uploads or i am wrong ?</p>