Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8475833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:00:13+00:00 2026-06-10T18:00:13+00:00

Once users upload their images to a non public (i.e outside htdocs or public_html

  • 0

Once users upload their images to a non public (i.e outside htdocs or public_html folder) folder, I use GD to fetch the image from that folder. This is all in the name of security, as the images themselves are never displayed without being processed.

The issue lies in animated GIFs, which GD is only capable of displaying by showing only it’s first frame.

I know that there are classes out there that can slice the gifs up into their respective frames and “glue” them back together, but I’m looking to display these on the fly…

I don’t want to create a new animated gif and show that, but rather have a GD script that renders the image from the information it gets from the photo directory, located outside of the public folder.

Thanks so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:00:15+00:00Added an answer on June 10, 2026 at 6:00 pm

    If you’re not manipulating the image at all, I would just return the contents of the file with the correct header.

    For example:

    <?php 
    
    $file = 'whatever.gif';
    
    // Do whatever checks you want on permissions etc
    
    header('Content-type: image/gif');
    readfile($file);
    
    ?>
    

    Readfile outputs the contents of the file, and the header makes sure the browser sees it as a gif and shows it. Because you’re not using GD it will still be animated.

    The catch with this method is you’ll need to know the content type for each file to server it correctly.

    http://php.net/manual/en/function.readfile.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a website where users can upload images. I don't want to use
I need to give users the opportunity to submit their details only once and
Once the user is authenticated, I fetch the User information from the Database and
I'm working on a website that will allow users to upload and sell their
I've got a problem with ProFTPD on Debian. I use users from MySQL database
My project will require users to upload uncompressed WAV audio files and once they
I have an upload form where users can upload images that are currently being
I have a website were users can create a profile and upload an image
So I am using the Uplodify plugin to allow users to upload multiple images
On my website, users can upload large images. I display these images like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.