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 6953503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:29:17+00:00 2026-05-27T14:29:17+00:00

I have an extension, where I need to generate thumbnails. For this, I wrote

  • 0

I have an extension, where I need to generate thumbnails.
For this, I wrote kind of a wrapper function.

public static function pictureGenerator($file, $title, $size_w, $size_h) {
    $cObj = t3lib_div::makeInstance('tslib_cObj');
    $imgTSConfig = array();
    $imgTSConfig['file'] = $file;
    $imgTSConfig['file.']['width'] = $size_w . 'm';
    $imgTSConfig['file.']['height'] = $size_h . 'm';
    $imgTSConfig['altText'] = empty($title) ? 'preview' : $title;
    $imgTSConfig['titleText'] = empty($title) ? 'preview' : $title;

    return $cObj->IMAGE($imgTSConfig);
}

This function works fine, as long as I use a path relative to the TYPO3-Directory:
Like: ../typo3conf/ext/sd_filmbase/res/images/default_film.jpg

But as soon as I try to use an absolute System-Path like the one below, no picture is generated anymore and “return $cObj->IMAGE($imgTSConfig)” returns NULL.
/var/www/vhosts/domain.com/httpdocs/path/to/picture/c.example.hq.jpg
This path is outside the TYPO3-Install-Directory – but is included within open_basedir (and safe_mode is Off).

I added the following path to open_basedir: /var/www/vhosts/domain.com/httpdocs/path/
And i tested with is_readable() if the file is readable from my extension – and it returned true.
Image Processing in the Install Tool works fine.

Do you have any idea, what else I could test? Or am I missing something essential?

Btw: I’m running TYPO3 4.6.1 and PHP 5.3.

SOLUTION:
Make a Symlink within Web-Directory to the external path. This Symlink has to be either within fileadmin/ or typo3conf/
See also konsolenfreddy’s Post.

  • 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-05-27T14:29:18+00:00Added an answer on May 27, 2026 at 2:29 pm

    The IMAGE function will always expect a file relative to PATH_site either in typo3conf or fileadmin (see getFilename function in t3lib_tstemplate).

    If you want to have an image outside your document root, two ways come to mind:

    1. put a symlink in a directory within typo3conf or fileadmin, e.g. fileadmin/myimages/, protect the directory content via .htaccess
    2. Use the Gifbuilder function directly. This might be cumbersome and might disable some higher level caching in the cObject.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to generate a unique temporary file with a .csv extension. What I
I have a prototype model where I need to include the following extension methods
The CollectionViewSource.GetDefaultView() method is not in Silverlight 3. In WPF I have this extension
I have some extremely complex queries that I need to use to generate a
I have a List<Polyline> that I need to generate in a second thread so
In C#, if you have multiple constructors, you can do something like this: public
I need help getting git extensions to run with msysgit. I have had bad
Does Python have extension methods like C#? Is it possible to call a method
I have used extension methods to extend html helpers to make an RSS repeater:
I have an extension method on the HttpApplicationState object for getting my IoC container

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.