Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#277 2025-12-27 20:16:59
Re: Automatic thumbnails for Textpattern
Right click a thumbnail that purports to be automatic (i.e. has /thumb/w800/… in it) and open in a new tab. If the process is failing you should see an error message in the browser.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#278 2025-12-27 23:00:39
Re: Automatic thumbnails for Textpattern
I get a 404 and this page source:
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
and this response:
Übersicht
URL: https://domain.com/images/thumb/w800/1.jpg?token=8140119e540a03e3fa8a0f587490f68f22e99ff0bfa06d4297ec1bacf1fd8e48
Status: 404
Quelle: Netzwerk
Adresse: xxx.xxx.xxx.xxx:443
Anfrage
:method: GET
:scheme: https
:authority: domain.com
:path: /images/thumb/w800/1.jpg?token=8140119e540a03e3fa8a0f587490f68f22e99ff0bfa06d4297ec1bacf1fd8e48
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: de-DE,de;q=0.9
Cookie: txp_login_public=986048ffd3julian; PHPSESSID=e310c00047975644b7a08ef70a222c94
Priority: u=0, i
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15
Antwort
:status: 404
Content-Encoding: br
Content-Type: text/html
Date: Sat, 27 Dec 2025 22:59:58 GMT
Server: nginx
Vary: Accept-Encoding
Parameter der Abfragezeichenkette
token: 8140119e540a03e3fa8a0f587490f68f22e99ff0bfa06d4297ec1bacf1fd8e48
TXP Builders – finely-crafted code, design and txp
Offline
#279 2025-12-27 23:43:16
Re: Automatic thumbnails for Textpattern
I think I’ve identified it as a problem in the default nginx vhost that I don’t quite understand yet.
It has a section as follows:
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map|mjs)$ {
add_header Access-Control-Allow-Origin "*";
add_header alt-svc 'h3=":443"; ma=86400';
expires max;
access_log off;
}
Removing jpg|jpeg from that list allows the images to appear. I need to learn what that means and then see what I should correct or exclude from that. But that’s a problem for tomorrow.
EDIT: Additional observations after further investigation:
Normal images seem to be handled just fine, so it looks like just the initial redirect to thumbnail creation situation that occurs when a token is passed isn’t being handled. To test that, I temporarily removed the image extensions from that list allows txp to create the thumbs, then restored the original nginx directive including the image extensions. The thumbnails created in the /images/thumb/…directories now work, just the new creation of thumbs doesn’t.
@gaekward or anyone else? Is there a way of either passing through image requests that result in a 404 or 301 to the thumbnail creation routine, and / or is there a way of excluding location regexs that contain a ?token= url parameter from this directive?
TXP Builders – finely-crafted code, design and txp
Offline
#280 Today 02:45:58
Re: Automatic thumbnails for Textpattern
none of these two options output the correct size image:
I have then in a TXP Form:
The thumbnail sizes on the Images panel is at 324×200 , but the image output is large … but if I right click to show image in a new window it is the proper size.
This also fails to render a small 324.200 image:
<img src=”../images/16t.png” width=“324” height=“200” alt=“nav” class=“portfolio__nav__img”>
but if I enter this html
<a href="https://example.ca/portfolio/bikes_wheels" class="portfolio__nav__item grid__item one-half medium--one-half wide--one-third is-active">
<img src="https://example.ca/assets/portfolio/nav-bici.png" width="324" height="200" alt="nav-solutions" class="portfolio__nav__img">
<h4 class="portfolio__nav__title">BikeHistory</h4>
<div class="portfolio__nav__role">Website Design</div>
</a><!-- 1 -->
the image is output at the right size of 324×200
Last edited by bici (Today 03:15:27)
…. texted postive
Offline