Tag Archives: image

.htaccess not working – only caching images and not JS or CSS [duplicate]

Questions: Duplicate: Why isn’t my javascript & css caching ? I’m noticing that I’m only receiving 304 HTTP codes (cached content) for images but not JavaScript or CSS. My .htaccess file is: Options -Indexes Options +FollowSymLinks # Enable ETag FileETag MTime Size # Set expiration header ExpiresActive on ExpiresDefault “access plus 1 week” # Compress… Read More »

URL Rewriting for images and css

Questions: I wonder if anyone can help with the below and if it is even possible. I have a server running apache and know a little about url re-writing and wondered if it is possible to use url rewriting for paths for images and css. so my current file structure is this: /index.php /theme/css/default.css /theme/images/image1.jpg… Read More »

Redirect everything except images

Questions: I cant understand why but: RewriteCond %{HTTP_HOST} market\.mysite\.com$ [NC] RewriteCond %{HTTP_HOST} !^market\.mysite\.com$ [NC] RewriteCond %{REQUEST_URI} \.(png|jpe?g|bmp|gif|swf|css|js)$ [NC] RewriteRule ^(.*) http://market.mysite.com/$1 [L,R] RewriteCond %{REQUEST_URI} !^/index\.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L] Works as expected. Redirecting images to an other domain. But this one: RewriteCond %{HTTP_HOST} market\.mysite\.com$ [NC] RewriteCond %{HTTP_HOST} !^market\.mysite\.com$ [NC]… Read More »

Sort images by exif data in php

Questions: I’m new to php and I’m trying to figure out how to sort images by exif creation date. The code below is the one from this tutorial I followed: Simple Php Gallery Pagination I just modified a little bit to retrieve exif data I’m looking for a method without database, the goal is to… Read More »

Intervention/Image requires FileInfo

Questions: Im having trouble with Intervention/image, Laravel #composer install – intervention/image 2.1.1 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system. I understand that it is trying to retrieve the extension fileinfo however I am having 0 luck with getting the extension to load. I believe that as of PHP… Read More »

Getting image size from XWPF document (Apache POI)

Questions: anyone had experience parsing docx file with Apache poi? while extracting image from CharacterRun using paragraph.getRun().getEmbeddedPictures(); I was not able to find a way to get scaling or/and width/hight data of picture. Is there functionality for that? Thank you. Answers: Figured that out! I am not sure if that’s the official way, but, here… Read More »

Ajax Upload image

Questions: Q.1 I would like to convert this form to ajax but it seems like my ajax code lacks something. On submit doesn’t do anything at all. Q2. I also want the function to fire on change when the file has been selected not to wait for a submit. Here is JS. $(‘#imageUploadForm’).on(‘submit’,(function(e) { e.preventDefault()… Read More »