ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@bittext.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Missing images in Wiki?
Date: Mon, 25 Jan 2021 09:19:29 +0100	[thread overview]
Message-ID: <69371550-0293-4A44-A514-F8CB171ACF05@bittext.nl> (raw)
In-Reply-To: <CAGhDZhC_i36+xekMGK_q9V2AYyeDN-cjej1N0yYgiAehbLZB1A@mail.gmail.com>



> On 22 Jan 2021, at 20:41, Andres Conrado Montoya Acosta <elandi@chiquitico.org> wrote:
> 
> This is one example: 
> 
> https://wiki.contextgarden.net/Command/externalfigure
> 
> However, now I checked the source, and the image files are there... and they are being correctly linked, but the image attributes width and height are set to zero. Maybe something wrong with lazy loading?

The remote cat was missing from ConTeXt’s image cache. I fixed that now by editing the source (added a space),
which made the wiki rerun ConTeXt, and that in turn made ConTeXt re-fetch the url contents.

The other images all load fine for me.



Images for ‘<context>’ blocks can be a little tricky, because the wiki software caches them based on a hash of the block’s contents. So if something transient goes wrong in the ConTeXt processing but ConTeXt still outputs some sort of PDF, then that output will never get fixed unless you edit the wiki source again. 

That does not happen a lot, but it is likelier to happen with remote content.

There are two ways around this:

1. edit the block source slightly, by adding a space or a % or something else that is harmless. That changes the hash key of the content, and the wiki will (probably) regenerate the graphic.

2. There is a ‘secret’ force attribute for <context>, but that should only be used to apply fixes like the one I did above, and it should be removed afterwards. That attribute bypasses the wiki caching altogether. But as that is really bad for the webserver’s performance, it should only be used if there is no other way. 

See also:  https://wiki.contextgarden.net/Help:Context


Best wishes,
Taak


— 
Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2021-01-25  8:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1611313201.30311.ntg-context@ntg.nl>
2021-01-22 19:41 ` Andres Conrado Montoya Acosta
2021-01-25  8:19   ` Taco Hoekwater [this message]
2021-01-21 19:30 Andres Conrado Montoya
2021-01-22  8:06 ` Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69371550-0293-4A44-A514-F8CB171ACF05@bittext.nl \
    --to=taco@bittext.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).