Forum

Thread tagged as: Problem, Addons, Blog

image crop in blog post not working

hi all,

i am trying to crop images while posting a new entry via the blog app. i am trying to crop images to the larger of two used sizes and resize them to the smaller ones using CSS. you can find the page here: www.alte-feuerwache.de//academy.

my page template looks like this:

<div id="text">
<?php perch_content('TextVorBlog'); ?>
<?php perch_content('BlogUeberschrift'); ?>
<?php  
perch_blog_custom(array(
                'count' => 1,
                'category' => 'startgross',
                'template' => 'ACA_post_in_list_startgross.html',
                'sort' => 'postDateTime',
                'sort-order' => 'DESC',
            ));
?>

<div class="blog_startklein-container">
<?php  
perch_blog_custom(array(
                'count' => 4,
                'category' => 'startklein',
                'template' => 'ACA_post_in_list_startklein.html',
                'sort' => 'postDateTime',
                'sort-order' => 'DESC',
            ));
?>

</div>
<div class="blog_zusatz"><p>Lies alle <a href="/academy/blog/post.php">letzten Neuigkeiten</a> im Überblick.</p></div>          
<?php perch_content('TextNachBlog'); ?>
<?php perch_content('Bilder'); ?>
</div>

my blog templates looks like this: for entries with LARGER IMAGES

<div class="blog_startgross">
<perch:if exists="image">
    <a href="<perch:blog id="postURL" />"  class="no_underline" >
    <img src="<perch:blog id="image" label="Image" type="image" width="370" crop="true" class="blogimage-startgross" />" alt="<perch:blog id="postTitle" />" width="370" />
    </a>
</perch:if>

        <h3><a href="<perch:blog id="postURL" />" rel="bookmark" class="entry-title"><perch:blog id="postTitle" /></a></h3>
        <div class="description entry-summary"><perch:blog id="excerpt" type="textarea" textile="true" />
        </div>
</div>

for entries with SMALL IMAGES

<div class="blog_startklein">

<perch:if exists="image">
    <a href="<perch:blog id="postURL" />"   class="no_underline" >
    <img src="<perch:blog id="image" type="image" width="175" height="115" crop="true" class="blogimage-startklein" />" alt="<perch:blog id="postTitle" />" width="179" />
    </a>
</perch:if>

        <p class="entry-title-start_klein"><a href="<perch:blog id="postURL" />" rel="bookmark" class="entry-title"><perch:blog id="postTitle" /></a></p>
        <div class="description entry-summary">
        <perch:blog id="excerpt" type="textarea" textile="true" />
        </div>

</div>
<perch:every nth-child="odd">
    <div class="blog_zwischen"> </div>
</perch:every>

i am uploading images far bigger than the croped size. they are shown on the final website at its original size (resized by CSS, but way to large filesizes).

strange enough the blog-entry admin area shows the croped dimensions of the image after the entry has been saved in the admin panel, but is still shown in its uncroped original size on the site.

screen before uploading: before uploading screen after uploading: after uploading

i cant see what i am doing wrong. any help would be really appreciated. thanks in advance - etienne

DIAGNOSTICS

    Perch: 2.8.6, PHP: 5.6.19, MySQL: 5.5.45, with PDO
    Server OS: SunOS, cgi-fcgi
    Installed apps: content (2.8.6), assets (2.8.6), categories (2.8.6), perch_blog (4.6), perch_upgrade (1.2), perch_backup (1.2)
    App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', ); ?>
    PERCH_LOGINPATH: /academy/perch
    PERCH_PATH: /mnt/web6/a3/96/539996/htdocs/academy/perch
    PERCH_CORE: /mnt/web6/a3/96/539996/htdocs/academy/perch/core
    PERCH_RESFILEPATH: /mnt/web6/a3/96/539996/htdocs/academy/perch/resources
    Image manipulation: GD
    PHP limits: Max upload 32M, Max POST 48M, Memory: 128M, Total max file upload: 32M
    Resource folder writeable: Yes
    DOCUMENT_ROOT: /home/strato/http/premium/rid/99/96/539996/htdocs
    HTTP_HOST: www.alte-feuerwache.de
    REQUEST_URI: /academy/perch/core/settings/diagnostics/
    SCRIPT_NAME: /academy/perch/core/settings/diagnostics/index.php
Etienne Girardet

Etienne Girardet 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Do the images appear in your main Blog post.html Master Template? Every image needs to appear in there at every size, not just in your listing.

If you need additional help please make sure you have updated Perch and Blog to the latest versions as those are what we would be making suggestions based upon.