<p dir="auto">Hello gentlemen,</p>
<p dir="auto">I'm using your library on a listview to load images, these images are being transformed to fit the max width of my layout using <em>override</em> but my placeholder have max dimensions for height/width; after dowloading and showing final image it keeps with the same size and aspect ratio than placeholder.</p>
<p dir="auto">After doing scroll it appear with proper size.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="                holder.mMultimediaLoadingProgress.setVisibility(View.VISIBLE);

                int size = (int) mContext.getResources().getDimension(R.dimen.chat_message_text_max_long); // 250dp

                Glide.with(mContext)
                        .load(msg.getMultimediaLink())
                        .placeholder(R.drawable.multimedia_placeholder)
                        .override(size, size)
                        .listener(new RequestListener&lt;String, GlideDrawable&gt;() {
                            @Override
                            public boolean onException(Exception e, String model, Target&lt;GlideDrawable&gt; target,
                                    boolean isFirstResource) {
                                holder.mMultimediaLoadingProgress.setVisibility(View.GONE);
                                return false;
                            }

                            @Override
                            public boolean onResourceReady(GlideDrawable resource, String model,
                                    Target&lt;GlideDrawable&gt; target,
                                    boolean isFromMemoryCache, boolean isFirstResource) {
                                holder.mMultimediaLoadingProgress.setVisibility(View.GONE);
                                return false;
                            }
                        })
                        .into(holder.mMsgImage);"><pre class="notranslate"><code class="notranslate">                holder.mMultimediaLoadingProgress.setVisibility(View.VISIBLE);

                int size = (int) mContext.getResources().getDimension(R.dimen.chat_message_text_max_long); // 250dp

                Glide.with(mContext)
                        .load(msg.getMultimediaLink())
                        .placeholder(R.drawable.multimedia_placeholder)
                        .override(size, size)
                        .listener(new RequestListener&lt;String, GlideDrawable&gt;() {
                            @Override
                            public boolean onException(Exception e, String model, Target&lt;GlideDrawable&gt; target,
                                    boolean isFirstResource) {
                                holder.mMultimediaLoadingProgress.setVisibility(View.GONE);
                                return false;
                            }

                            @Override
                            public boolean onResourceReady(GlideDrawable resource, String model,
                                    Target&lt;GlideDrawable&gt; target,
                                    boolean isFromMemoryCache, boolean isFirstResource) {
                                holder.mMultimediaLoadingProgress.setVisibility(View.GONE);
                                return false;
                            }
                        })
                        .into(holder.mMsgImage);
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="                &lt;ImageView
                    android:id=&quot;@+id/conversation_chat_list_item_msg_image&quot;
                    android:layout_width=&quot;wrap_content&quot;
                    android:layout_height=&quot;wrap_content&quot;
                    android:scaleType=&quot;fitCenter&quot; /&gt;"><pre class="notranslate"><code class="notranslate">                &lt;ImageView
                    android:id="@+id/conversation_chat_list_item_msg_image"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:scaleType="fitCenter" /&gt;
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;layer-list xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    android:layout_width=&quot;wrap_content&quot;
    android:layout_height=&quot;wrap_content&quot; &gt;

    &lt;item&gt;
        &lt;shape
            xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
            android:shape=&quot;rectangle&quot;&gt;
            &lt;size
                android:width=&quot;@dimen/chat_message_text_max_long&quot;
                android:height=&quot;@dimen/chat_message_text_max_long&quot; /&gt;
        &lt;/shape&gt;
    &lt;/item&gt;

    &lt;item&gt;
        &lt;bitmap android:src=&quot;@drawable/ic_file_image_box&quot; android:gravity=&quot;center&quot;/&gt;
    &lt;/item&gt;

&lt;/layer-list&gt;"><pre class="notranslate"><code class="notranslate">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" &gt;

    &lt;item&gt;
        &lt;shape
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:shape="rectangle"&gt;
            &lt;size
                android:width="@dimen/chat_message_text_max_long"
                android:height="@dimen/chat_message_text_max_long" /&gt;
        &lt;/shape&gt;
    &lt;/item&gt;

    &lt;item&gt;
        &lt;bitmap android:src="@drawable/ic_file_image_box" android:gravity="center"/&gt;
    &lt;/item&gt;

&lt;/layer-list&gt;
</code></pre></div>
<p dir="auto">How can I manage this ?</p>
<p dir="auto">Thanks a lot for you really good work, regards.</p>
<p dir="auto">I'm trying to use both fitCenter and placeholder but the image does not get resized.</p>
<p dir="auto">This code works fine (image is scaled down, aspect ratio is correct):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Glide.with(this).load(url).fitCenter().into(mImage);"><pre class="notranslate"><code class="notranslate">Glide.with(this).load(url).fitCenter().into(mImage);
</code></pre></div>
<p dir="auto">This code does not work (placeholder is correct, but loaded image appears squished, aspect ratio is wrong):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Glide.with(this).load(url).placeholder(R.drawable.placeholder).fitCenter().into(mImage);"><pre class="notranslate"><code class="notranslate">Glide.with(this).load(url).placeholder(R.drawable.placeholder).fitCenter().into(mImage);
</code></pre></div>