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

  • SEARCH
  • Home
  • 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 8971937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:05:18+00:00 2026-06-15T18:05:18+00:00

I have an array of images as strings pulled from the DB, I am

  • 0

I have an array of images as strings pulled from the DB, I am pulling these into the browser by means of an ajax call. I’ve got the controller action setup and am able to view the image arrays with associated data, but when I attempt to render the images by iterating over the array and preceding each string with a header, only the first image display. I am assuming this is because either the browser is unable to determine the length of each image string, or Zend is sending the headers first and then the image data, I am uncertain. I have tried multiple methods of encapsulation, output buffering, etc. with 0 success.

We are attempting to avoid keeping these images on disk, otherwise I’d simply be storing the path and id and reflecting this in the view helper. Is there an obvious approach here that I’m missing? Or possibly a feature of Zend I’m unaware of to facilitate what I’m trying to do?

UPDATE: I added the solution I ended up with below.

  • 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-15T18:05:20+00:00Added an answer on June 15, 2026 at 6:05 pm

    I ended up going with a rather simple solution; creating two actions within the same controller. The first constructed the markup for the images, iterating over an array created from the model function that pulled all the images for a particular client/event, this would produce:

    <img src="/controller/action/imgKey/12345/" />
    

    The second action would accept the resource request from the image, get the imgKey by _request->getParam(); and then serve the header and string for each image. This allowed me to utilize the user authentication and session schemes already in use. Maybe this approach will be useful to someone else.

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

Sidebar

Related Questions

I need to get array of images that have to call from server and
I am trying to return mime types from an array. I have these strings
I have an array of urls of images, from which i have to first
I have an array of strings images[]={1.png,2.png,n...png}; I am trying to set the source
I have an images array in which there are number of images. Not fixed,
I have image Array with two images out of that first image its showing
i have two int array of images , i have implemented it in grid
I am using PHP and I have an array of user images that I
I need to display array of images in a single view which have various
I have an observable array with var items= [ {image: /images/image1.jpg }, {image: /images/image2.jpg

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.