1

i have two things to complete in my project, First thing is to hide the image path,That is done using dynamically loading the image (imageJPEG) from imageConvert.php with the parameters,The Second thing is i need to implement client side browser caching, For this i was using the

<link rel='subresource'> 

before ( with normal image path ) , but it is not working with dynamic image loading. Do anybody have solution for this.

echo "<img class='lazy' src='imageConvert.php?raw=$image&cap=ps&hash=$user_id' />";
echo '<link rel="subresource" href="imageConvert.php?raw=$image&cap=ps&hash=$user_id" as="image">'; 

Thanks in advance.

insaneray
  • 75
  • 1
  • 11

1 Answers1

1

Your image will not be cached by the browser because, as you know, it's a dynamic image being printed by a php script file.

PHP outputs cannot be cached by the browser, so if you wanna hide the image path, try to use a Rewrite condition in your htaccess to change it to another location.

  • Hi brother , Thanks for the reply , I'm actually fetching the images from another server and those images are used by live applications right now, i'm building an extension website and fetching the images from that server , so is it possible to write an htaccess condition with that path .. – insaneray Dec 17 '20 at 08:07